Forum Moderators: phranque
http://www.example.com/page.htm.%20%20
http://www.example.com/page.htm
RewriteEngine On
RewriteRule ^(.*)\.\s\s$ /$1 [R=301,L] http://www.example.com/some_other_page_altogether/
RewriteCond %{REQUEST_URI} ^(.+\.html)
RewriteRule \.html. http://www.example.com/%1 [R=301,L] RewriteRule ^page\.htm. http://www.example.com/some_other_page_altogether/ [R=301,L] [edited by: penders at 10:35 pm (utc) on Jul 22, 2014]
if we are literally redirecting "page.htm" (which admittedly I'd taken to mean any page; or is it literally any page?) to "some_other_page_altogether/" then we probably don't need to capture anything after all... (?)
did I mention that I am a product of the California Public Education System?
then you should omit the . after "htm" so everyone gets redirected, whether their initial request was right or wrong.
considering how half the time I make a change to my .htaccess file I end up chunking my whole site