apache - htaccess url rewrite .html page version to non .html version (bug :www.http//) -
this question has answer here:
- how remove .html url 8 answers
i want redirect old pages (mywebsite.com/help.html) (mywebsite.com/help).
so added code in .htaccess file:
rewriteengine on rewritebase / rewritecond %{the_request} ^[a-z]{4,}\s([^.]+)\.html [nc] rewriterule ^ %1 [r,l,nc] it's working strange issue when try url:
mywebsite.com/page.html
i result
www.http//mywebsite.com/page/
you can see url rewrite adding invalid code in start of page url (((www.http//))
try one:
rewritecond %{request_filename}.html -f rewriterule !.*\.html$ %{request_filename}.html [l]
Comments
Post a Comment