Gallery2 - URL Rewrite - Show Item
|
Knobbyman
Joined: 2003-07-22
Posts: 2 |
Posted: Fri, 2006-09-15 00:14
|
|
Gallery2 works great until I enable URL Rewrite - Show Item. When I do that I loose access to all my images. Disabled - http://www.knobbyman.com/main.php?g2_itemId=7217 I've left the setting disabled because it shows the same error either way.. Thanks. |
|
| Login or register to post comments |

Posts: 277
Check your .htaccess file for conflicting rewrite rules. This happens to me all the time when I play with URL rewrite...if any two rules are the same then gallery seems to just redirect you back to the main page. If you aren't familiar with the code for Apache rewrite mods then perhaps someone on here can help you with the code
Posts: 43
I have a similar problem, with the latest Gallery version: as soon as I enable 'Show Item' -> pictures gone.
Has this problem been resolved?
Regards,
Evert
Posts: 14524
meulie,
works for me and others.
examples please?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 43
Sure. Here's my .htaccess before enabling 'Show Item':
# BEGIN Url Rewrite section # (Automatically generated. Do not edit this section) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . - [L] RewriteCond %{THE_REQUEST} /sitemap(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=sitemap.Sitemap [QSA,L] RewriteCond %{THE_REQUEST} /popular(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=dynamicalbum.PopularAlbum [QSA,L] RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshowapplet\.html(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=slideshowapplet.SlideshowApplet&g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshow\.html(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /key/([^?/]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L] RewriteCond %{THE_REQUEST} /f/([^?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_controller=permalinks.Redirect&g2_filename=%1 [QSA,L] </IfModule> # END Url Rewrite sectionThen I enable 'Show Item', and get:
# BEGIN Url Rewrite section # (Automatically generated. Do not edit this section) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . - [L] RewriteCond %{THE_REQUEST} /sitemap(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=sitemap.Sitemap [QSA,L] RewriteCond %{THE_REQUEST} /popular(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=dynamicalbum.PopularAlbum [QSA,L] RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshowapplet\.html(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=slideshowapplet.SlideshowApplet&g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /v/([^?]+)/slideshow\.html(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=slideshow.Slideshow&g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /key/([^?/]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=%1 [QSA,L] RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /f/([^?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_controller=permalinks.Redirect&g2_filename=%1 [QSA,L] </IfModule> # END Url Rewrite sectionMy albums no longer show...
Regards,
Evert
Posts: 14524
Uninstall the module. verify that .htaccess is empty.
Install, test activate and test. Activate one rewire rule one at a time and see where it gets you.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 43
Done. With only 'Show Item' activated in the module I get the following .htaccess:
# BEGIN Url Rewrite section # (Automatically generated. Do not edit this section) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . - [L] RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/main\.php$ RewriteRule . /main.php?g2_path=%1 [QSA,L] </IfModule> # END Url Rewrite sectionand no albums showing...
Regards,
Evert
Posts: 14524
I don't understand.
URL?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14524
I enable only the view rule, it works for me:
http://4megs.com/gallery2/main.php
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 43
Check http://photo.meulie.net/
(I will revert back to a working config in a couple of hours. With this broken config no one can see my pics...)
Regards,
Evert
Posts: 43
and does your .htaccess look identical/similar to mine?
Regards,
Evert
Posts: 14524
For some reason, your page is not finished. Looking at the source is just stops :
.... .... <script type="text/javascript"> // <
Regards,
Evert
Posts: 14524
I added a album tree on my test site:
http://4megs.com/gallery2/main.php as well as change the name of the root album. I can't reproduce so I will leave this for now.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 43
Hi again!
I've done some testing, and I am actually able to re-create the problem by letting PHP handle the re-write, instead of .htaccess.
Therefore my problem must be caused on a deeper/different level, I think...
My main album no longer has any quotes in its name, and both .htacess & php-rewrite give me the same problem: no albums showing as soon as I enable 'Show Item'.
I have also located the culprit: As soon as I remove 'Album quick links (DHTML)' from the Matrix theme, all works the way it should. I guess I will keep that disabled for the time being...
Regards,
Evert
Posts: 14524
I don't understand. G2 has the rewrite rules that write a new .htaccess file.
So how to reproduce?
Enable the show item and give the matrix theme a DHTML album select list?
Seems to work for me.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 43
I'm not sure on how to reproduce... There is something in my Gallery-database that is not liked by the DHTML album select plugin, that's all I know... Are there any characters that should not be used in album names? That make the DHTML plugin barf?
Regards,
Evert
Posts: 14524
Not that I can find.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 14524
I think I was able to see this issue, but not able to reproduce. Not really sure, but I saw the same symptoms. Clearing cache in /lib/support seemed to have fixed it for me.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team