G2 -> G3 URL rewrite rules?
snackmaster
Joined: 2005-11-20
Posts: 135 |
Posted: Wed, 2010-04-14 01:32 |
I'm following my 404s after upgrading to G3 RC1 and I'm trying to figure out how to redirect all .jpg.html pages to the top level of my new gallery. I would work to strip the .jpg.html "extension" from G2 and redirect requests 1-1 but not all my new URLs use the filename. I'm trying things like this in my .htaccess, without success: Any ideas? |
|
Posts: 16504
If you go through the G2 Import process it has a list of rewrite rules at the bottom of the import page.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 135
Thanks, I had issues during the G2 import process did not get the rules written down or into my .htaccess during my second shot at upgrading.
If anyone has them and could kindly share!
Posts: 16504
To get settings just for your setup, go to Admin > Settings > Gallery 2 Import
The bottom of the page will contain those. If not here are mine:
Change the 2 directories in bold to match your setup. I've only installed G3 as a test so far and haven't replaced a G2 install with it in the same place yet.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 135
Thanks! ...as I have nothing below the file import path area on my G2 import page. I do recall it coming up during import and i copied for safe keeping but then due to import issues my priorities and focus changed
Posts: 135
Hmm playing with it and not working, my G3 install doesn't have a /g2/ folder in the path.
My G2 = /gallery2
My G3 = /gallery
I've tried
RewriteBase /gallery/
RewriteRule ^(.*)$ /gallery2/g2/map?path=$1 [QSA,L,R=301]
and
RewriteBase /gallery2/
RewriteRule ^(.*)$ /gallery/g2/map?path=$1 [QSA,L,
Posts: 16504
Where are you putting those rewrite rules? It should be in an .htaccess file in your old G2 location.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 135
Ah! My old G2 location is gone.... I'll rebuild the structure.
Posts: 16504
No need to rebuild the structure. Just need to create that old gallery2 directory and an .htaccess file, then put those rewrite rules in that location.
That would explain why you probably didn't see those rules anymore, because the G2 Import module in G3 couldn't find embed.php for your G2 install
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 135
Still struggling with this, both old and new Gallery's were in the same directory /gallery/ and I end up in an endless loop:
Since the path to my images are the same in G3 with G2 I'm trying to trim the old extension: .jpg.html
Trying to get: this /DSC_3469.jpg.html to this /DSC_3469
I'm no good at .htaccess
Posts: 135
Got it, had to add /gallery/ to the 4th line /gallery/$1/
and for files I renamed with G3
RewriteRule ^gallery/DSC_7005 http://www.domain.com/gallery/MyImage [R=301,L]
Posts: 7
same problem as above.
i need to convert
http://www.modelingtime.com/galleria/d/16643-3/CIMG4526.JPG
to
http://www.modelingtime.com/gallery/var/albums/aerei/Bonovox/CIMG4526.JPG?m=1293369936
can you help me??
Posts: 7994
@simmons: the same advice for snackmaster should work for you.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 15
Sorry guys I know this might be a basic or even stupid question but my Current Gallery 2 htaccess has a redirect from Gallery 1. Should I clear that out first or add in the new redirect above it?
Posts: 7994
Hm. I can't remember what the G1->G2 redirects look like! I'd try leaving them both in place and see if it works.. if it does, theoretically it'd redirect G1 urls -> G2 urls -> G3 urls and it'd be ok.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!