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?


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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