Relative Links in WAMP
Posted by: simm (---.mpls.qwest.net)
Date: February 21, 2009 03:39PM

Hi all,

I have WAMP5 installed on my Vista x64 machine. I have several projects (websites) on the WAMP homepage.

For instance:

domain1.com
domain2.com
domain3.com
domain4.com

And, each of those websites have subfolders (like most all websites). Let's say domain1.com has a folder called 'subfolder1'.

So my problem arises when I enter one of my projects (or websites). On the homepage of domain1.com ('http://localhost/domain1.com'), there is a link to 'subfolder1', which in the HTML is a relative link called '/subfolder1/' (without quotes). So when I click on the subfolder1 link, it points to 'http://localhost/subfolder1/' which is totally wrong. I need it to point to 'http://localhost/domain1.com/subfolder1/'. On one of the other sites I have, the links work fine because in the HTML of the page, the relative link is 'subfolder1/. This works, because WAMP isn't going up one level and seeing it as 'localhost'. So, is WAMP not liking the '/' before the link, or is it something else?

My question is: Do I have to go through all my links and change them from '/subfolder1/' to 'subfolder1/'? There has to be some way around this, as a couple of my sites have thousands of pages. (argh)

Okay, maybe back up a little. All my projects (or 'websites') are stored in the www folder in wamp. For instance: 'C:\Users\simm\Web\wamp\www\domain1.com\', 'C:\Users\simm\Web\wamp\www\domain2.com\', etc. And those show up in WAMP just as they should as 'domain1.com', 'domain2.com', etc.

Greatly appreciate the help!
Thanks,
simm



Edited 1 time(s). Last edit at 02/21/2009 03:41PM by simm.

Options: ReplyQuote
Re: Relative Links in WAMP
Posted by: yfastud (Moderator)
Date: February 22, 2009 02:56AM


Options: ReplyQuote
Re: Relative Links in WAMP
Posted by: simm (---.mpls.qwest.net)
Date: February 22, 2009 07:11AM

Thanks, I'll check that out!

Check out some awesome PHP tuts: [www.youtube.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.