Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a friend's site, which works fine live, but isn't working on my computer. After tearing my hair out for a while, I figured out it's because he wrote all his links with a leading slash.

For example, if the file was to link to, then he would write <img src="/images/redapple.jpg />. On the live site that works, but on my computer, it goes to the root path and looks for the images folder there.

Is there something I can do to make all this code work on my computer, without going through 50+ files and changing the slash on every single link?

I'm using XAMPP. I am also totally new at this and very confused.

share|improve this question

The easiest thing would be to put his code in the root of the htdocs. If you need to, it would be possible to modify the apache config so that there is a separate virtual host, and have his code be in the root of the document root of that virtual host.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.