Forum Moderators: phranque
^(.*?)/?$
i don't see why the regex will fail - but i have a very limited experience with htaccess/apache enviroment.
^(.*?)/?$ client wants his pages to have extension
so.. index.htm, contact.htm, etc.
# Index redirect
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html?\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html? http://www.example.com/$1 [R=301,L]
#Slashes
When are slashes added?
Trailing slash denotes a folder or the index page in a folder.
The DirectorySlash directive takes care of that automatically.
URLs for pages should not have a trailing slash. This is in the HTTP specs.
# Non-www/www redirect
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L] RewriteRule ^paintings/rats/(kabloona|yesno)\.html http://www.example.com/hovercraft/caribou.html#$1 [R=301,L,NE]