![]() |
|
Long time user, first time mod_rewrite attempt - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Long time user, first time mod_rewrite attempt (/thread-1238.html) |
Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 Hi all, http://www.generalmagic.org has been running for a while (with sub-albums now) but it's the first time I tackle the issue of mod_rewrite/.htaccess. I have turned on mod_rewrite in the zp-config.php file and modified my .htaccess (in /var/www/gallery with: RewriteBase /gallery I have switched to the testing theme to eliminate any issue that might be theme related. http://www.generalmagic.org/gallery/ works but clicking on any album doesn't. Where should I look first ? Long time user, first time mod_rewrite attempt - thinkdreams - 2007-03-02 @edasque- What version are you running. If not 1.8.0.2, then you should upgrade. Modrewrite and subalbums didn't work "perfectly" before version 1.0.7. If you are on 1.8.0.2, then let us know, and we can help you further from there. Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 I am running 1.0.8. If I need to move to 1.0.8.2 I will, let me know. Long time user, first time mod_rewrite attempt - thinkdreams - 2007-03-02 Nope, 1.0.8 should work. Hmmm. How about upgrading to 1.0.8.2 and see what happens. Tristan included some fixes in there that may be what you are experiencing. Should be just a file replacement in the /zen directory for your current files. Try that, and let us know. Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 So I updated to 1.0.8.2: cp index.php /var/www/gallery Note that the version on the admin tool still says 1.0.8, I am not sure that's right. The problem remains. Don't know if it's subalbums related as clicking on a main album results in the error. http://www.generalmagic.org/gallery/ -> works http://www.generalmagic.org/gallery/zen/admin.php works by the way. So it might not be related to sub-albums and spacing. I am betting on user error in mod_rewrite/.htaccess/zenphoto configuration. Any idea ? Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 for reference, this is my .htaccess: htaccess file for zenphotoNOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.RewriteEngine On !!! Change this to the web path (eg: http://www.example.com/photos --> /photos) !!!RewriteBase /gallery RewriteRule ^admin/?$ zen/admin.php [R,L] RewriteCond %{REQUEST_FILENAME} -f [NC,OR] RewriteRule index.php$ index.php [L,QSA] Catch-all - everything else gets handled in PHP for compatibility.RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA] Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 Could mod_rewrite not be on in my config. Is there a way to turn it on at the apache level ? Long time user, first time mod_rewrite attempt - thinkdreams - 2007-03-02 mod_rewrite, if it's on in zp_config (set to true), then is on for zenphoto. I can't imagine your host doesn't support it. And the admin will say 1.0.8, since the functions.php variable for version # is 1.0.8. I changed mine manually, but that's just a cosmetic thing I do to keep track of what version I'm using. Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 so any idea ? I noticed that an old URL such as: http://www.generalmagic.org/gallery/index.php?album=Portfolio+2007%2FRassain does get rewritten as (what I imagine is correctly) : http://www.generalmagic.org/gallery/Portfolio%202007/Rassain Which would seem to indicate that my config doesn't seem to be able to deal with that path ? Long time user, first time mod_rewrite attempt - thinkdreams - 2007-03-02 I don't have any ideas on this one. Most of what you're explaining behavior-wise should be fixed with 1.0.8.2. Any thoughts Tristan? Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 I decided to do a full install (instead of upgrade after upgrade since 1.0) of zenphoto 1.0.8.2 just using my existing zp-config.php, database and albums directory. Since I nixed the cache, the thumbnails don't appear anymore and I still have the URL issue. Long time user, first time mod_rewrite attempt - thinkdreams - 2007-03-02 Did you update the zp_config to the current one in the 1.0.8.2 distribution, or are you still using the older version, as there have been some changes in that file recently. Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 I had. I just rebuilt it from scratch and ended up with the same issue. Long time user, first time mod_rewrite attempt - trisweb - 2007-03-02 It's as simple as mod_rewrite not being enabled on your host. Give us a `` to verify, but I'll bet you that's it. That should be your first clue when none of the paths work ;-) Also, your cache directory is not writable, but that's an entirely different problem :-) http://www.generalmagic.org/gallery/zen/i.php?a=Portfolio%202007/Rassain&i=IMG_7493_4_5.jpg&s=thumb Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 Ok, the cache thing happened when I reinstalled an hour ago. Sorry about that. Should be fixed. Here's a phpinfo: http://www.generalmagic.org/phpinfo.php Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 Ok, I have enabled mod_rewrite by moving the rewrite.load file to mods-enabled and it seems mod-rewrite is now enabled from the phpinfo.php file but the problem remains ? Long time user, first time mod_rewrite attempt - trisweb - 2007-03-02 Seems like it's still not getting the mod_rewrite enabled. You have your own server (or VPS) (Debian too, nice) so you'll probably need to add
in your directory configuration block to enable the use of .htaccess files to override the httpd conf. :-) Ex: `
` Long time user, first time mod_rewrite attempt - edasque - 2007-03-02 Awesome. That worked. So to sum it up I didn't have mod_rewrite enabled and didn't have it configured to allow overrides in my virtual host configuration. Thanks a bunch, you two ! Long time user, first time mod_rewrite attempt - trisweb - 2007-03-02 You're welcome! Yeah, I had the same problem setting up my server. You have to configure a lot of things manually that you take for granted on shared hosting |