Gallery 2 URLs that are rewritten by Gallery 3 cause a redirect loop
multiverse
Joined: 2005-05-06
Posts: 4 |
Posted: Thu, 2014-05-08 02:07 |
Hello, PROBLEM: Gallery 2 URLs that are rewritten by Gallery 3 cause a redirect loop when .htaccess is in the tree that has been symlinked, and the .htaccess refers to the symlink. Here is what I have done: I used Gallery 2 at my website for several years. I couldn't get the final upgrade to complete successfully. I tried twice in 2 years. A few days ago I decided to see if an upgrade path to Gallery 3 had been sorted out, and here I am. Typical Gallery2 URL Typical Gallery 3 URL As you can see the URLs are different, and my HTML img tags are no longer working, the effect being that images in the old hive do not appear. I hope you noticed in the URLs above this segment: /images/ Here is what it looks like on the *nix filesystem at Dreamhost: images -> Gallery.3.0.9/ Please assume the permissions and owner/group are correct. As you can see I use a symlink that allows me to roll back to Gallery 2. I use this method so that I can install a new version of Gallery 3 when one comes out. I used the same method for Gallery 2. This rub this time is that I need to do a redirect. I use the one that was presented by the Gallery 2 import tool found in the Gallery 3 settings: Quote:
<IfModule mod_rewrite.c> I added this section to the bottom of $G3_HOME:/images/.htaccess - and here is that file in its entirety: http://pastebin.com/QnMFRgv2 Using the typical Gallery2 URL: http://www.example.com/images/d/66977-4/example.gif The loop manifests itself in the browser: An examination of $G3_HOME/images/var/logs/2014-05-07.log.php gives no clues, just that it's basically empty. An examination of my error.log reveals something totally expected: Quote:
File does not exist: $G3_HOME/images/d No surprise, after all, this is what we are trying to fix. An examination of my access.log reveals pretty much what the browser saw: Quote:
GET /images/index.php/g2/map?path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=index.php/g2/map&path=main.php&g2_view=core.DownloadItem&g2_itemId=71179&g2_serialNumber=2 I am using PHP 5.3.17 and Gallery 3.0.9. The directives used in .htaccess have been enabled by my provider. So to restate the problem: Gallery 2 URLs that are rewritten by Gallery 3 cause a redirect loop when .htaccess is in the tree that has been symlinked, and the .htaccess refers to the symlink. Thank you! |
|
Posts: 4
Anyone willing to give this a go?