.htaccess, mod_rewrite, and redirection still doesn't work.

MattMMatt

Joined: 2005-12-08
Posts: 3
Posted: Thu, 2005-12-08 04:41

I have recently installed gallery2 on my server. I ran the migration from my gallery v1 folder. Everything has seemed to import correctly. The issue I am having is using the .htaccess and mod_rewrite to have the old links work properly.

I had some fun getting mod_rewrite running right, but I am sure it is working properly now. Right now when you go to the original gallery site, it loads fine. It was loading a blank page this morning, I believe.

Ok. The original gallery is at http://matt.theimac.com/gallery/ pictures at /gallery/ both of these directories have this .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !gallery_remote2.php
RewriteRule (.*)$ /gallery2/main.php?g2_controller=migrate.Redirect&g2_path=$1 [QSA]
</IfModule>

The new gallery is at http://matt.theimac.com/gallery2/
I've got a thumbs up for URL Rewrite in the modules, after I gave the directory permission with apache.

Any clues?

Gallery version = 2.0.2 core 1.0.0.2
PHP version = 4.3.10 apache
Webserver = Apache/1.3.33 (Darwin) PHP/4.3.10 mod_perl/1.26
Database = mysql 4.0.18
Toolkits = ArchiveUpload, Exif, ImageMagick
Operating system = Darwin www.themacnews.com 7.8.0 Darwin Kernel Version 7.8.0: Wed Dec 22 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC Power Macintosh
Browser = Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/416.12 (KHTML, like Gecko) Safari/416.13

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-12-08 12:57

why don't you put your new gallery to the same place your old gallery used to be?
i'd rename gallery/ to g1/
then rename gallery2/ to gallery/

then just activate the g1 -> g2 redirection in
site admin -> url rewrite

and finally, to also redirect "hotlinked" g1 images, add the .htaccess from site admin -> import from g1 to your g1 albums/ folder

 
MattMMatt

Joined: 2005-12-08
Posts: 3
Posted: Thu, 2005-12-08 15:20

That'd seem too logical and would follow the migration instructions way too close. ;-)

If I do the renaming, will I need to do a complete reinstall of gallery2, or can I just access the site admin, and update it's directory?

Thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-12-08 15:39
 
MattMMatt

Joined: 2005-12-08
Posts: 3
Posted: Thu, 2005-12-08 16:14

Alright, I moved the gallery2 to where gallery was. Running good. Used the mod_rewrite to enable migration rule.

Trouble, so here is a link I had on my web site to an album. It goes to a blank page now:
http://matt.theimac.com/gallery/view_album.php?set_albumName=sunglasses

I guess the question is, what is the correct behavior. I know software won't do EXACTLY what I think it will. Should that link still work? What should my old albums folder show?

Thanks for all the help!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-12-08 20:43

yeah, the G1 long urls are not forwarded to g2.

http://matt.theimac.com/gallery/sunglasses should point to g2, afaik