I am working on fixing my entire URL to be shorter with 301 redirects. I will fix almost all of them, however there is a URL that ends with .cfm that will not be rewritten.
FROM: http://www.mydomain.com/index.cfm/catlink/17/pagelink/7/sublink/34/art/41/rec/1/page.cfm TO: http://www.mydomain.com/story/resources/health/page/168/page.html
If I change /page.cfm
to /page.html
, then rewriting will work.
Here is a rewrite rule that works for my other urls
RewriteRule ^index.cfm/catlink/([a-zA-Z0-9/-]+)([/])pagelink/([a-zA-Z0-9/-]+)([/])sublink/([a-zA-Z0-9/-]+)([/])art/([a-zA-Z0-9/-]+)(.*)$ http://localhost/index.cfm?page=moved&cat=$3&subcat=$5&article=$7&story=$8 [R=301]
Why does this work when the URL ends in .html, but not when it ends in .cfm? What am I doing wrong?
This is the current link and will not work:
http:
If I manually changed its end to .html, I can make it work:
http:
source share