php - htaccess rewrite non html request -


i've migrate dynamic .asp site static site using sitesucker osx app... works done if access directly!

old url:

http://www.mysite.com/content.asp?l=1&idmen=158‎ 

new url:

http://www.mysite.com/content.asp-l=1&idmen=158‎.html 

i page not found old referral inbound links (google, yahoo etc...)

i like, using .htaccess, redirect links not contains ".html" permanent redirect html page...

i've tried not work:

rewriteengine on rewritecond %{request_uri} !\.html rewriterule ^(.*)$ $1.html [r=301,l] 

many frankie

as per examples if want modify query string need rule in document_root/.htaccess file:

rewriteengine on  rewritecond %{query_string} !\.html$ [nc] rewriterule !\.html$ %{request_uri}-%{query_string}.html? [l,r=301,ne] 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -