Need .htaccess for mod_rewrite for G1>G2 migration...
WebKat
Joined: 2002-11-22
Posts: 182 |
Posted: Sat, 2012-04-07 05:31 |
I actually did this migration a few years ago...but I never finished up with making the G1>G2 mod_rewrite thing so I could remove my g1 stuff and have it all forward correctly... but I looked in the database and the migration map is there, so I just need to figure out how the .htaccess file should read. The problem is that I moved the gallery from one subdomain to another subdomain... though the actual files are in folders in the same public_html folder on my server. The .htaccess file in my gallery2 folder is this: # BEGIN Url Rewrite section # (Automatically generated. Do not edit this section) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /gallery2/ RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php RewriteCond %{REQUEST_URI} !/gallery2/main\.php$ RewriteRule . - [L] RewriteCond %{THE_REQUEST} /gallery2/d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/gallery2/main\.php$ RewriteRule . /gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [$ RewriteCond %{THE_REQUEST} /gallery2/v/([^?]+)\.davmount(\?.|\ .) RewriteCond %{REQUEST_URI} !/gallery2/main\.php$ RewriteRule . /gallery2/main.php?g2_view=webdav.DownloadDavMount&g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /gallery2/w(/[^?]*)?(\?.|\ .) RewriteCond %{REQUEST_URI} !/gallery2/main\.php$ RewriteRule . /gallery2/main.php?g2_controller=webdav.WebDav&g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /gallery2/v/([^?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/gallery2/main\.php$ RewriteRule . /gallery2/main.php?g2_path=%1 [QSA,L] RewriteCond %{THE_REQUEST} /gallery2/([^?]+)(\?.|\ .) RewriteCond %{REQUEST_URI} !/gallery2/main\.php$ RewriteRule . /gallery2/main.php?g2_controller=migrate.Redirect&g2_path=%1 [QSA,L] </IfModule> # END Url Rewrite section
if that's any help... |
|
Posts: 1642
http://codex.gallery2.org/Gallery2:migration#Preserving_Gallery_1_URLs might be helpful.
--
dakanji.com
Posts: 182
It isn't helpful at all. I already did all that up to the .htaccess part. I HAVE NO IDEA what to put in the .htaccess file. I can barely understand--no make that I can't understand what I see in most mod_rewrite .htaccess files that other people have written. The concept that I would be able to craft such a file is so ludicrous as to be beyond the realm of even my sense of humor.
--
WebKat, Gallery2 holdover extraordinaire.
Posts: 1642
I don't see anything in the instructions asking anyone to craft any files.
The concept of the Gallery Project Devs asking people to self craft such a complicated file is so ludicrous that the thought that you could even consider it a possibility is staggering.
Perhaps it is a language thing, but what this statement: "Basically, you need to add a .htaccess file with the contents as shown on that page in your Gallery 1 albums/ folder" says to me is ...
1. You create a text file on your local machine
2. You copy the htaccess contents from the "Site Admin -> Import: Gallery 1" page
3. You paste these contents into this new file
4. You save the file in your "gallery1/albums" folder as ".htaccess"
--
dakanji.com
Posts: 182
THAT'S where it was. I knew I'd seen the clip of code for the .htaccess file somewhere, but for the life of me I could not recreate the situation to show it again. I figured I'd missed my chance to see and grab it once I finished the migration. Thanks.
[/b]By the way, does anyone else get (/b]B every time they type a capital B and (/i]I every time they type a capital I in the Post new comment window? (with a [ instead of a [ of course)? It's really weird.
--
WebKat, Gallery2 holdover extraordinaire.