.htaccess - Redirect .html extension to no html extension -


i using rule in .htaccess

rewritecond %{request_uri} !^/billing/ rewriterule ^([^\.]+)$ $1.html [nc,l] 

and wondering it possible automatically redirect links have .html @ end e.g examplewebsite.com/fishing.html examplewebsite.com/fishing

thanks!

you can add redirect rule .html removal before earlier rule:

rewritecond %{the_request} /([^.]+)\.html[\s?] [nc] rewriterule ^ /%1 [r=302,l,ne] 

Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -