I am trying to remove .php.html and traling slash from url using htaccess, so that this code works fine for php, but not for html and trailing slash
For php
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] RewriteCond %{REQUEST_URI} !/system/.* [NC] RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
For HTML
RewriteCond %{REQUEST_URI} index.html RewriteRule ^(.*)index.html$ /$1/ [R=301,L]
source share