I'm upgrading an installation of Gallery on my account, and I'd like to set up some .htaccess rules to redirect certain types of links to another address.
Gallery gives me some .htaccess code to put transfer links from my old installation (gallery2) to my new installation (gallery3), but it's designed for transferring links from DirectoryA to other links in DirectoryB:
If I understand this correctly, this .htaccess code will take every link that is directed at /gallery2/ and append that link onto the end of the RewriteRule for the /gallery3/ directory, correct?Code:<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteBase /gallery2/ RewriteRule ^(.*)$ /gallery3/index.php/g2/map?path=$1 [QSA,L,R=301] </IfModule>
For example, if my gallery2 link is:
this will change the link to this:Code:http://www.mysite.com/gallery2/main.php?g2_itemId=35
correct?Code:http://www.mysite.com/gallery3/index.php/g2/map?path=main.php?g2_itemId=35
However, once I'm done with upgrading, I'm going to rename the new /gallery2/ directory to /gallery3/. How would I change this .htaccess so that it directs something to another link in the same directory?
Every link in Gallery2 is some variation of this:
http://www.mysite.com/gallery2/main.php?g2_itemId=35
If I want to keep the same directory, can I change the .htaccess to something like this?
[code]Thanks for any help, I know this is a little long-winded.Code:<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteBase /gallery2/main.php?g2_itemId= RewriteRule ^(.*)$ /gallery2/index.php/g2/map?path=main.php?g2_itemId=$1 [QSA,L,R=301] </IfModule>


LinkBack URL
About LinkBacks



Reply With Quote


Bookmarks