Forum Moderators: phranque
I have been running the following htaccess code successfully for years; however, the index.html to site.com/ portion is causing a 403 forbidden error when trying to access mysql and wordpress interfaces on the site account. I believe it is because the htaccess is redirecting ALL index.html which may also be the name of the admin pages for such web based interfaces for wordpress, etc?
Has anyone ever experienced this? Is there a way to specify site.com/index.html get redirected, and not just /index.html?
Here is the current code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html$ [site.com...] [R=301,L]
RewriteCond %{HTTP_HOST} ^site.com [NC]
RewriteRule ^(.*)$ [site.com...] [L,R=301]
I have tried to change it to no avail. I removed 'DirectoryIndex index.html' to prevent looping. Any help would be greatly appreciated.
Thanks!
Greg
RewriteCond %{REQUEST_URI} !^/mysql-admin-directory/
RewriteCond %{REQUEST_URI} !^/wp-admin-directory/
See the Apache mod_rewrite documentation for more info.
Jim