[SOLVED] help with rewrite
|
Ted.Szukalski
Joined: 2006-06-22
Posts: 10 |
Posted: Mon, 2012-04-23 03:28
|
|
<a href="http://www.digital-photo.com.au/">Ted Szukalski - Gallery of Digital Photography</a> Hi, could some one help me with .htaccess rewrite rule? I have upgraded from Gallery 2 to Gallery 3. Google has an index of thousands of my photos from Gallery 2. Most of them enter as: The same image in Gallery 3 is located at: So the rule has to: Silly question: which htaccess should the resulting rule be places in? /, /v or /gallery3 Ted |
|

Posts: 304
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} ^/v/(.*)(\.jpg|\.gif|\.png)\.html$ RewriteRule .* /gallery3/index.php$1 RewriteRule ^([^\+]*)\+([^\+]*)\+([^\+]*)\+([^\+]*)\+([^\+]*)$ $1-$2-$3-$4-$5 RewriteRule ^([^\+]*)\+([^\+]*)\+([^\+]*)\+([^\+]*)$ $1-$2-$3-$4 RewriteRule ^([^\+]*)\+([^\+]*)\+([^\+]*)$ $1-$2-$3 RewriteRule ^([^\+]*)\+([^\+]*)$ $1-$2 RewriteRule (.*)(\.jpg|\.gif|\.png)\.html /$1 [L,R=301] </IfModule>Add additional lines in case you have file names with more than 5 + signs.
Posts: 10
Big thank you. It worked straight away.
This is my day 1 on Gallery 3 and I am really grateful this forum exists with helpful people like you.
Ted
Posts: 121
(can't I delete a comment??)
Instead of here, I'm continuing on the thread I started: http://gallery.menalto.com/node/106660 , if anyone can help....