Forum Moderators: phranque

Message Too Old, No Replies

htaccess works for .htm and .html when only .html is specified

         

apauto

7:40 pm on Dec 2, 2010 (gmt 0)

10+ Year Member



Hi guys,

I have:

RewriteRule ^widgets/([^.]+)/([^.]+)/color/([^.]+).html?$ /scripts.php?a=$1&b=$2&c=$3 [L]

This works for when the url is:

/widgets/a/b/c.html

and also

/widgets/a/b/c.htm

Any idea how I can fix this?

thanks

g1smd

7:49 pm on Dec 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The question mark means the L is optional.

Remove the question mark from the rewrite.

Add a preceding redirect so that if .htm URLs are requested, user is redirected to the .html version.