After viewing some 'NOT FOUND' errors for my Wordpress website through Google Webmaster Tools, I went ahead and started doing some 301 redirects to the correct links. However, since I no longer use an index.html file in the website's root directory, I would prefer if there was a way to redirect all requests for http://mydomain.com/index.html to http://mydomain.com/. A working index.php file resides in the website's root directory for which Wordpress loads upon requests for http://mydomain.com/, but hides the index.php part in the URL.
I found the following through a Google search and it worked for a while, until I started getting "500 Internal Server Errors" just recently. Upon deleting it, things returned to normal (strange!). I really don't know what happened.
- Code: Select all
Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.html\ HTTP/
RewriteRule ^/?index\.php$ http://mydomain.com/ [R=301,L]RewriteCond %{HTTP_HOST} ^mydomain.com$RewriteCond %{HTTP_HOST} ^mydomain.com$
Does anyone see what may be wrong or needs modifications? Thanks!