If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Problem with localhost/xampp

Just a quick question for you guys.

I develop on xampp and I develop multiple sites in sub-folders. My problem is that it's not letting me use each sub-folder as its own site.

So say I'm coding on site a. And in it I want image and I call it like I would on a webserver with <img src="images/a.gif"> and then on site b I call it like <img src="image/b.gif">. Each sub-folder has it's own images folder.

The problem is, instead of image a calling localhost/a/images/a.gif like it would on a web-server is calls localhost/images/a.gif. Is there a way to fix this other then calling it using localhost/a/images/a.gif? Because I would hate to have to do that and then rewrite all the links when it came time.

Use a relative path for the images instead. The behaviour is otherwise normal since these are subdirectories and not site roots, so when it wants to look from the root it will go directly from localhost and not localhost/x. You can also lock the site root in using html's base tag which can be used temporarily while developing (which is IMO the fastest way to write a simple test up).
So IMO you should either use a base to temporarily change the location of the base url, or you should use relative paths instead.