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 am currently using Apache on Linux. I've been working on an HTML project, but now need to run it on a server.

So for example, even if the root directory is "/var/www/" and localhost/index.html points to "/var/www/index.html" I can make localhost/project/index.html point to "/project/index.html"

Can I also do this in .htaccess files?

share|improve this question

You want Alias, but that won't work in .htaccess files. You'd have to use mod_rewrite for those.

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.