What should the rewrite rule be?
Austin Kinsella
Joined: 2007-08-05
Posts: 39 |
Posted: Thu, 2007-09-06 22:45 |
Gallery URL (optional but very useful): http://cps.itcarlow.ie/gallery/ Please correct me if I am making false assumptions ... As I understand it, the purpose of rewriting is that the user will see a URL such as http://cps.itcarlow.ie/gallery/NightBW, but as this is not a real directory it will be rewritten to http://cps.itcarlow.ie/gallery/view_album.php?set_albumName=NightBW so that the gallery scripts are invoked, passed the target directory and do their magic. This is not working for me, and I have temporarily disabled rewriting in config.php with $gallery->app->feature["rewrite"] = 0; as described in the FAQ. I would like to get it working. In the sites enabled file for my virtual site (cps.itcarlow.ie) I find these entries for rewriting: Thanks. |
|
Posts: 13451
Re-running the config wizard should recreate the rewrite rules in your gallery/.htaccess file. If it doesn't work after doing that, check your Apache error logs for clues as to what is wrong.
h0bbel - Gallery Team
If you found my help useful, please consider donating to Gallery
http://h0bbel.p0ggel.org
Posts: 39
Ah. In /etc/gallery there is a .htaccess with a more complex set of rules. There is also an apache.conf file which sets an alias for gallery to /usr/share/gallery, which is where all the php etc files are. Is there a conflict here - will both the apache.conf AND the .htaccess files be used? Or is there a conflict between the rewrite rule in my cps.itcarlow.ie virtual host file and the rules in /etc/gallery/.htaccess?
In config.php I changed $gallery->app->feature["rewrite"] back to =1, and then in my browser refreshed the page (so the links go back to the http://cps.itcarlow.ie/gallery/NightBW form) and clicked the thumbnail. The error log shows:
File does not exist: /usr/share/gallery/NightBW, referer: http://cps.itcarlow.ie/gallery/
Thanks for your help.
AK
Posts: 39
It could probably have been fixed differently, but I cured my problem by moving the Gallery files from usr/share/gallery to /var/www/cps/gallery - in the filepath of my virtual host, which is of course where the installation docs say to put it. Rewriting is now functioning correctly.
AK