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
Post a Comment