I have upgraded my gallery2 to gallery3, and notice that some links no longer resolve correctly. Since the proper way is to redirect these with a 301, that is the way I'm going. The following series need redirecting:
Folders:
/v/various/Gry/
/various/Gry/
Pages:
/v/Jacob/02112008310.jpg.html
/Jacob/02112008310
(both are of course just examples. there are 100's of folders & files to redirect...)
I think there were/are also direct links to images, but those I'm not bothering with for now.
NB. these are the existing rewrite rules:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L]
RewriteRule ^index.php/(.*) $1 [QSA,R,L]
Where should I insert your lines?
try these... I've made some examples like you mention and these worked. Let me know if you got some corner cases that these rules don't cover.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^v/(.*[^/])/(.*[^/])/ /$1/$2/ [R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^v/(.*[^/])/(.*[^/.])\.(.*).html$ /$1/$2? [R=301]