.htaccess tutorial

htaccess Elite


Missing Trailing Slash Code

Ask your mod_rewrite and Redirection questions here, and get answers!

Missing Trailing Slash Code

Postby produke » 02 Oct 2006 01:18

Fix for missing the trailing slash for directories on htaccess redirected domains and subdomains.
Code: Select all
RewriteEngine On
RewriteBase /
RewriteCond s%{HTTPS} ^((s)on|s.*)$ [NC]
RewriteRule ^/*(.+/)?([^.]*[^/])$ http%2://%{HTTP_HOST}/$1$2/ [L,R=301]
User avatar
produke
 
Posts: 242
Joined: 25 Sep 2006 04:48

Return to Redirect or Rewrite Questions