Some URL redirects work, some don't

adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Sat, 2007-08-25 10:18

Get system details; useful for copy/paste into G2 support forum.

Last Run Details:

Gallery version = 2.2.2 core 1.2.0.4
PHP version = 4.4.7 cgi
Webserver = Apache/1.3.33 (Unix)
Database = mysqlt 4.0.25-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, LinkItemToolkit, NetPBM, Thumbnail
Acceleration = none, none
Operating system = Linux infong 2.4 #1 SMP Thu Jan 13 08:59:31 CET 2005 i686 unknown
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Rows in GalleryAccessMap table = 377
Rows in GalleryAccessSubscriberMap table = 3884
Rows in GalleryUser table = 120
Rows in GalleryItem table = 3882
Rows in GalleryAlbumItem table = 181
Rows in GalleryCacheMap table = 0


G2 URL (optional): www.cpforums.org
G2 version:
G1 URL (optional): http://www.cpforums.org/g1/ (was updated from an earlyier G1 so I could run the tools for G2 tonight...)
G1 version:
G1 character set:
PHP memory limit: 40M
--

So some files are redirecting, for example: http://www.cpforums.org/gallery/nepenthes/P1010018 (old url)
But other files don't redirect: http://www.cpforums.org/gallery/albums/album06/maxima7_6_07_1

It seems if it has "...gallery/albums/album**" it won't but if it is "...gallery/*******" it works fine.

Thanks very much for any help :)
Andrew

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2007-08-25 14:29

go to "site admin -> migrate" and read the instructions. it should say there that you need to copy the ".htaccess" contents that it shows there into a new ".htaccess" file in your g1's albums/ folder.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Sat, 2007-08-25 14:47

Hello, I have done that. That's how some of the URLs are working, I'm guessing... Here is the .htaccess file I'm using:

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

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Sun, 2007-08-26 00:30

Some added information, when I click one that doesn't forward (like the 2nd one in my first post) it takes me to a blank page... no error or anything.. And the URL is of the old forum. So it isn't even attempting to change it...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-08-26 00:50

you need 2 separate .htaccess files. and they have different contents.
one is in your gallery/ folder and the other in your albums/ folder.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Sun, 2007-08-26 01:13

I only have 1 .htaccess file listed in the admin/import... how do I find the content for the other?
Thanks!

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Tue, 2007-08-28 05:09

Is it possible to get help with the code, or should I call those links "dead" and move on?
Thanks kindly.
Andrew

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-08-28 12:54

my note above is somewhat incorrect.

the .htaccess contents shown in "site admin -> migrate: gallery1" is for the .htaccess file in your g1's albums/ folder.

for the gallery/ folder:

1. if your new gallery/ folder, where gallery2 resides, is the same location as your gallery1 installation used to be, then you need need to go to "site admin -> url rewrite" and enable the g1->g2 redirection rule.
2. if your gallery1 used to be at another location (not gallery/), then you need to copy the same .htaccess that you have in your g1 albums/ folder to your old gallery's folder.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Tue, 2007-08-28 13:43

the G1->G2 Mapping option?

that already is active.

I don't see a "g1 -> g2 redirection rule" I've downloaded the plugin list and don't see it there either.

[img]http://www.cpforums.org/gallery/d/20717-1/galleryscreen.jpg[/img]

Thanks so much valiant!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-08-28 15:31

if you copied the .htaccess contents to your albums/.htaccess file, then everything should be fine.

> I don't see a "g1 -> g2 redirection rule" I've downloaded the plugin list and don't see it there either.

it's on the screenshot... "g1->g2 mapping" under the "Migration" heading.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Tue, 2007-08-28 17:24

Well, the .htaccess file is supposed to be ONLY what I get as the redirect code right? Not something else in there too? Cause I do have it there... And I know the file exsistes... Here is an example:

http://www.cpforums.org/gallery/albums/album06/maxima7_6_07_1 <--- old location
http://www.cpforums.org/gallery/d/18435-2/maxima7_6_07_1.jpg <--- new location

on my server.. I have a folder "cpforums" and within that folder is "g1" and "gallery" Under "g1" is the .htaccess file. The whole contents of that file is:

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

Either I'm seriously missing something really simple. Or there is a problem.

"g1" and "gallery" should be at the same level, right? not one folder INSIDE the other?

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Sat, 2007-09-01 14:49

I was using this:

Quote:
Note that these redirects are not active until the G1 images are actually removed or moved. Omit the !-f line shown below to redirect anyway.

But decided to delete the files and put the !-f line back in... And it still doesn't work. So I'm still at a loss for ideas... :-\

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Tue, 2007-09-04 22:17

.

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Tue, 2007-09-04 22:17

.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-09-04 22:25

how many rows (entries) does your database table g2_G1MigrateMap have?
how many items did you import from g1?

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
adnedarn
adnedarn's picture

Joined: 2007-08-25
Posts: 32
Posted: Tue, 2007-09-04 22:32

Hi valiant, I just deleted my past 2 entries as I give up on trying to solve this. it's such a small % of items that seem to not be fowarding I'm not too worried about it. :) Now my interest is moved to getting my gallery into my vbulletin software. I just started a new topic but I guess it could be in the wrong place :-\

There are 3879 G1->G2 map entries Delete All
and there were
Date: 08/25/2007
Owner: adnedarn
Size: 11 items (3958 items total)

So between that difference and the 100 or so images deleted with the check_orphans and verify_albums or whatever.. that's about how many are not working I guess. Simple answer, thanks for pointing that out! It seemed there was lots more not working, but apparently I was "lucky" on coming across the ones that didn't work.