missing /gallery/ in friendly urls

mcbQ

Joined: 2009-01-06
Posts: 4
Posted: Fri, 2009-01-16 19:40

Hello,

I have a seemingly small problem that is preventing me from making the final switch to integrating G2 into WP.

My G2 install is at www.mywonderfuldomain.com/gallery/

My WP install is in the root www.mywonderfuldomain.com/

When I activate the plugin and rewrites the integrated Gallery itself, the index, is correctly pointing to www.mywonderfuldomain.com/gallery/ (WPG2 page title and slug is 'gallery') but I get the following URLs for gallery items:

www.mywonderfuldomain.com/v/Albumname/etc....

While it should be www.mywonderfuldomain.com/gallery/v/Albumname/etc... to keep all the thousands of old URLs the same.

I.o.w. it's missing the /gallery/ portion in the new URLs

I tried starting over with renaming the G2 dir to /gallery2/ and the WPG2 page title+slug named gallery again and I end up with the same results, i.o.w. it all works fine except for the url being too short. I also tried to add /gallery/ to the embedded rewrite config section which didn't work either.

Is this something I can correct with a simple config change or can you tell me how I should modify the rewrite rules to get the desired results?

TIA!

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2009-01-22 00:59

Hiya McBq,

Any Gallery2 content access via Wordpress will be via your Wordpress URL thus your URL's will NOT have /gallery/ in them. Sorry but it is not possible to mix Standalone Gallery2 URL's and WPG2 URL's together. It been tried before and broke many things..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
mcbQ

Joined: 2009-01-06
Posts: 4
Posted: Thu, 2009-01-22 18:16

Thanks for the reply.

I think you got me wrong, I don't want to mix URLS, I want them to be only available through the WPG2 version at /gallery/

For example:

1. Rename the current /gallery/ directory to /gAoLdbgluif47tgkjvhblUIGF/
2. Install and enable WPG2 (pointing to the gallery at gAoLdbgluif47tgkjvhblUIGF)
3. Rename the page title and slug to 'gallery'
4. Enable rewrite in the gallery

Since the old gallery folder is renamed it's available again as a rewrite target url. I can use gallery as the page title so there's no reason why I shouldn't be able to use the rest of the urls as well.

Actually, my specific situation isn't even that relevant. Let me ask it this way:

Is it possible to have the URLs of the integrated gallery pages be at for example: www.yourdomain.com/wpg2/v/Albumname instead of www.yourdomain.com/v/Albumname ? In other words I just want to have the gallery pages appear to be inside a subfolder of the 'page' WPG2 creates and not in the root of the WP install.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2009-01-22 23:49

Yes it is possible, I use to have a documentation page in the Wiki about having SOE links in Gallery2 but it has vanished someplace..

To make SOE Links look the same between Gallery2 and my Blog I changed the WPG2 post slug to Photos then I have prefixed photos to the relevant Gallery2 Rules, in my case Show Item and Download Item so they look like photos/%path% and photos/d/%itemId%-%serialNumber%/%fileName%

Follow this with caution as playing with these rules can break links.. Also Note, If you noticed I have removed the v/ in the Show Item because photos/ is unique enough..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo