I have a subdirectory abc
in the document root /var/www/html
I want to be able to run any file any_file.html
within the subdirectory by typing in the browser:
localhost/any_file
instead of localhost/abc/any_file.html
or
my_domain.com/any_file
instead of my_domain.com/abc/any_file.html
I tried writing in httpd.conf
:
<Directory "/var/www/html/abc">
RewriteEngine On
RewriteBase /
RewriteRule %{REQUEST_FILENAME} %{REQUEST_FILENAME}\.html
</Directory>
But it doesn't work. Options FollowSymLinks
is activated in <Directory>
so I believe I would not need to write this again. Does anyone knows why and how to solve it? Thanks.
Update: I have another subdirectory efg
which I need to be able to access through localhost.