Apache version: 2.4
OS: Ubuntu 14.04
I am not sure whether I wrote the heading correctly. My index file is located at some directory (say /var/www/html/new/
) rather than the default apache root. I want apache to load the index file from this directory when I type localhost
or my IP onto the address bar. I cannot use this (/var/www/html/new/
) directory as the document root, since I have dependency files in /var/www/html/
. I want apache to load the index file in the directory /new/
without altering the url. I mean when I type localhost
It should load that index file and the url should not be localhost/new/
Is there any way to do this? Can it be made possible using .htaccess
file? I am pretty new to this stuff. It would be helpful if someone could explain in simple terms.
UPDATE
I just read this is possible using apache url rewrite. Can somebody explain how to do this? Does it use htaccess?