Hello,
Does anyone have rewrite rules that'll redirect old gallery 3 links from my gallery to the new url structure with piwigo? I'd hate to lose all of the links I've posted online.
Piwigo version: 2.7.1
PHP version: 5.3
MySQL version: 5.5
Offline
I don't think identifiers are preserved so you won't be able to do that
Offline
Difficult to believe there is no solution to this, but maybe it's so obvious nobody bothers mentioning it!
I have the same problem, but would settle for redirecting to the relevant album.
I tried the solution here https://github.com/channone-arif-nbcuni/gallery but it fails for me during the search the piwigo database phase.
My G3 URLs take the form "http://www.travelsignposts.com/destination/Austria/Vienna/ViennaOpera/vienna-staatsoper_austria_0021". Having had a look at the code in redirect.php in the github reference above, I'm not sure how it could work in my case (or why it doesn't!). My coding abilities are perilously close to negligible, so that is hardly surprising.
Is there a possible solution here that could be developed? I'm sure there must be many other G3 refugees who are in a similar situation.
Hopefully,
Tony
Piwigo 2.8
PHP 5.
MariaDB 5.5.48
Offline
Just to add to this, I think this code would redirect the three levels of albums I'm interested in:
RedirectMatch 301 /destination/Austria http://www.travelsignposts.com/destinations/index.php/category/208-austria RedirectMatch 301 /destination/Austria/Vienna/.*/ http://www.travelsignposts.com/destinations/index.php/category/210-vienna RedirectMatch 301 /destination/Austria/Vienna/Vienna-walking-tour/.* http://www.travelsignposts.com/destinations/index.php/category/212-vienna_walking_tour
but of course would require a line for each album (in my case 768!). Can someone smarter than me come up with a solution? Basically, I need to extract e.g. "Vienna" from the old URL, make it all lower case, and then search the piwigo albums for "vienna" as the sole element added to the id number and serve up that album page. This last point is important, as there are other albums containing "vienna", e.g. "vienna-walking-tour".
The element to extract would always be the last album in the old URL.
Offline
I have hacked the code provided here (https://github.com/channone-arif-nbcuni/gallery) and have two php files (redirectphoto.php and redirectalbum.php) which redirect the Gallery3 URL to the corresponding photo and album in Piwigo respectively.
So I have to send the corresponding URLs to the right php file via .htaccess, but I'm not having much luck.
All my photo files contain the strings "AJP" "DSC" or "IMG", e.g. "hundertwasserhaus_AJP5669".
Here's my current effort, but I'm not having much luck:
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !(.*AJP.*|.*DSC.*|.*IMG.*)$ [NC] RewriteRule ^(.*)$ /xyz/redirectalbum.php?$1 [R=302,L] RewriteRule ^(.*)$ /xyz/redirectphoto.php?$1 [R=302,L]
It checks out OK at the htaccess tester at http://htaccess.madewithlove.be/ , but...
Can anyone help with this and show me where I am going wrong?
Tony Page
Offline