Hello Fellas,
I am having trouble doing what i want to do with the following setup.
I would like to remove all WWW, and also forward index.html to root dir. I would like this to be for all domains, so i am doing inside httpd.conf directory directive.
I tried many variations with no success. Latest version is below (domains are inside /var/www/html, in seperate directories).
http://www.example.com/index.html > http://example.com
http://www.example.com/someother/index.html > http://example.com/someother/
Thanks,
Maria
<Directory "/var/www/html/*/">
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
#RewriteCond %{REQUEST_URI} /^index\.html/
RewriteRule ^(.*)index\.html$ / [R=301,L]
Options ExecCGI Includes FollowSymLinks
AllowOverride AuthConfig
AllowOverride All
Order allow,deny
Allow from all
</Directory>