|
Finally I managed to solve the problem like this/with this, longer, slightly adjusted code:
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/\ ]+/)*[^.\ ]+\.htm\ HTTP/
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(([^/]+/)*[^.]+)\.htm$ http://www.mysite.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ http://www.mysite.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME}.htm -f
RewriteRule ^(([^/]+/)*[^./]+)$ /$1.htm [L]
For those of you, who'd like to do the same thing, you must place this code into the .htaccess file and, you must also:
-set permissions: 6-4-4 for files
-set permissions: 7-5-5 for folders
|