Forum Moderators: open

Message Too Old, No Replies

Changing the Root

         

noyearzero

5:44 pm on Sep 22, 2008 (gmt 0)

10+ Year Member



Not so sure this is an HTML question but here is my example:

<img src="/images/picture.jpg" >

the browser will resolve this to "http://www.mysite.com/images/picture.jpg"

i want to change it so it resolves everything on the page with a leading "/" to a root of "http://www.mysite.com/afolder/" making the links "http://www.mysite.com/afolder/images/picture.jpg".

base href changes the relative folder, i'm looking to change the absolute root.

I'm running PHP, but i don't think it has anything to do with that.

tedster

6:24 pm on Sep 22, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're right, it's not an issue that HTML can resolve. Server side scripting is what you need. On an Apache server, for instance, you could use .htaccess to create the appropriate rule.

I'd suggest taking up this question in either the Apache forum [webmasterworld.com] or Windows IIS forum [webmasterworld.com], assuming that you are on one of those two servers.