apache - Setting the HTACCESS file to redirect all .cfm requests to index.php -
i have .htaccess rewrite rule wrote, supposed take requests container index.cfm , redirect them index.php.
http://testsite.com/index.cfm/a/catalog.prodshow/vid/42110/catid/154
however, not redirecting properly. if put in index.cfm (no rest of url) works fine, however, moment /a/... added it, takes me 404 page.
how adjust rule works url has index.cfm anywhere in it?
here rule:
rewriterule ^index.cfm$ /index.php [l,nc,r]
thanks.
in rewriterule, ^ , $ indicate start , end of line. if wish match index.cfm (like /index.cfm/a/... or /sub1/sub2/index.cfm/...) can try:
rewriterule ^(.*index.cfm.*)$ /index.php?original_url=$1 [l,nc] i added original url parameter because might need process request , removed r flag avoid loops.
Comments
Post a Comment