Forum Moderators: phranque
# allow all pages to execute php
AddType php-script .php .php3 .html .htm .asp#make sure error page returns 404 not 200!
ErrorDocument 404 /custom404.htmRewriteEngine On
RewriteBase /# redirect domain.com to www.mydomain.com
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ [domain.com...] [R=301,L]# redirect index.ext to /
RewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php多tml多tm地sp)\ HTTP
RewriteRule ^(.*)index\.(php多tml多tm地sp)$ /$1 [R=301,L]#redirect default.ext to /
RewriteCond %{THE_REQUEST} ^GET\ .*/default\.(php多tml多tm地sp)\ HTTP
RewriteRule ^(.*)default\.(php多tml多tm地sp)$ /$1 [R=301,L]
I've tested it against every possibility I can think of and it appears to be OK. (NB the broken bars are actually solid!)
Have I done anything which may harm my site, or are there any improvements I could add?
/Steve
I directories which have an index.asp (the site was previously on IIS) links to /, index.asp, index.php, etc throw a 403 forbidden. Non index asp pages work fine.
I've worked round this by renaming the offending pages index.php. But I'd really like to understand what is causing this, can anyone shed any light?
/Steve
Jim