Click to See Complete Forum and Search --> : mod_rewrite breaks when training slash


Mindzai
02-14-2009, 04:19 PM
I have the following in .htaccess:


RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) /$1.html [L]


This turns URIs such as domain.com/something into a request for domain.com/something.html, which is what I want. However, if someone types domain.com/something/, I get a 500. I tried the following:

RewriteRule (.*)/?$ /$1.html [L]

But the error persists. Anyone have any ideas of a method for fixing this?