Force trailing slash, redirect .html to trailing slash, delete more then one slash

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d #Redirects .html to trailing slash RewriteRule (.+)\.html$ /$1/ [L,R=301] #force trailing slash RewriteCond %{REQUEST_URI} !(/$|\.) RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] # entfernt mehrfache Slashes RewriteCond %{REQUEST_URI} ^(.*)\/\/+(.*)$ RewriteRule ^(.*)$ %1/%2 [R=301,L] </IfModule>
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus