when I first set up my site I decided to add index.html to the URL but now I have problems with when people remove the index.html and try and access the folder…
For example:
RewriteRule ^archives/([0-9]+)/([0-9]+)/index.html archive.php?mid=$1-$2
So when archives/07/2009/ it will cause an error, how can I avoid this error?
Cheers
Make the
index.htmloptional in yourRewriteRule:Also, in your original rewrite rule, you forgot your end of string anchor
$. I’ve added it above.