.htaccess not dropping .HTML as intended
-
I want my .htaccess to drop trailing .HTML for all incoming URLs. Example is
https://acme.com/blog/sample-topic.html
… would become
https://acme.com/blog/sample-topicI’ve tried several version of .htaccess rewrite commands but nothing works. Here is my latest attempt:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # remove the .html extension RewriteCond %{THE_REQUEST} ^GET\ (.*)\.html\ HTTP RewriteRule (.*)\.html$ $1 [R=301] </IfModule> # END WordPress
Why isn’t this .htaccess code dropping the trailing .HTML of all incoming URLs?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘.htaccess not dropping .HTML as intended’ is closed to new replies.