My goal is to redirect /index.html to / with the .htaccess file I found the following code and added it to the front of my existing .htaccess file: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/ RewriteRule ^(.*)index\.html$ /$1 [R=301,L] This has had no effect. I have a linux based account with registerfly, plesk control panel, and apache server. This is the full text of the file below. Please give me some advice. Thanks. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/ RewriteRule ^(.*)index\.html$ /$1 [R=301,L] # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName proe-design.com AuthUserFile /home/httpd/vhosts/proe-design.com/httpdocs/_vti_pvt/service.pwd AuthGroupFile /home/httpd/vhosts/proe-design.com/httpdocs/_vti_pvt/service.grp
Try this instead: Options +FollowSymLinks RewriteEngine on RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ RewriteRule ^index\.html$ http://www.domain.com/ [R=301,L] Code (markup):
OK I'm totally retarded. It was actually working the first time. I thought I uploaded the .htaccess to my test site. I had actually done it to my real site. Thats why the test site wasn't responding. Both codes actually work.