embeded g2 using url rewrite where htaccess

manny917

Joined: 2005-04-21
Posts: 21
Posted: Fri, 2005-06-03 02:18

Ok I have mod rewrite running but in the test phase of url rewrite it says it can't write to the .htaccess for embedded - what folder do i need to create an .htaccess file for this to work?

Gallery version = 2.0-beta-3+ core 0.9.22
PHP version = 5.0.4 apache2handler
Webserver = Apache/2.0.54 (Win32) PHP/5.0.4
Database = mysql 4.1.10a-nt
Toolkits = Exif, Gd, Thumbnail, NetPBM, Dcraw, ImageMagick, Ffmpeg
Operating system =Windows XP pro sp2
content= phpnuke

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2005-06-03 02:28

None, it won't work. It means the URL rewrite rules designed for Gallery are NOT going to work on the embedded version. This is because the master application, PHPNUKE in your case, controls the URLs. These URLs are completely different than what the URLs Gallery's URL rewrite rules are expecting. So it would either plain not work or break something.

IOW, the URL rewrite can only be used with the stand alone version of Gallery.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-06-03 06:26

rewrite works when embedded in xaraya.. is phpnuke different somehow?
manny917, I think the folder should be the directory where the gallery2 integration script is.. ie, if you access g2 via /nuke/index.php?module=gallery2 then you'd want .htaccess in /path/to/nuke

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-06-03 08:20

we have no phpnuke knowledge so it's hard to tell if rewrite works at all or what customizations / changes would be needed.

 
manny917

Joined: 2005-04-21
Posts: 21
Posted: Fri, 2005-06-03 12:13

ok was just wondering - i suppose i should hop over to nukedgallery.net for these questions - cause another question i had is that zip download thru embedded works but when you try to open the zip file its corrupted - works fine thru standalone. funny is that rar can open the zipp saying its corrupt but you can see the files in the zip, windows zip support just says file is corrput and does not open. mindless i will try your suggestion

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2005-06-03 12:40
mindless wrote:
rewrite works when embedded in xaraya.. is phpnuke different somehow?

Maybe it might just depend on how the master application configures it's URLs to call the slave application. I'm not sure about phpnuke, but here's how Postnuke (I was confused) configures it's URLs:

This is from G1:
example.com/modules.php?set_albumName=album22&op=modload&name=gallery&file=index&include=view_album.php

I might be mistaken, but that won't fall into any of the rewrite rules setup for Gallery (1 or 2).

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-06-03 18:18

G2 writes the G2 urls in the page, so it can write appropriate short urls.. the module helps you put a .htaccess in the right place to process those short urls.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2005-06-04 03:22

Thanks for the clarification. I guess I was getting confused with some of the URL and rewrite stuff.

 
xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Tue, 2007-09-11 03:06

Using this method visitors to http://www.zacatecas.net/modules/mGallery2/gallery2/main.php are redirected to http://www.zacatecas.net/index.php?name=mGallery2&file=index - There is no problem there. But when I look at the images I find that their path is set to /modules/mGallery2/gallery2/main.php thus being redirected to the new address, in dong this all links for the images in the gallery are broken.

This is what I added in the htaccess file:

Redirect 301 /modules/mGallery2/gallery2/main.php http://www.zacatecas.net/index.php?name=mGallery2&file=index

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-09-11 11:16

@xchido:
your problem is solved with mode.embed.only. see: http://gallery.menalto.com/node/69064#comment-249783

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

 
xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Fri, 2007-09-14 03:37

Two re-upgrades procedures and using the cleaup.sh did the job. My gallery is fully integrated into PN and my main stand-alone gallery page is now re-directed beautifully to the PN integrated main gallery.

Thank you Valiant for your help.

Next item on the agenda? Remembering what customization I had on the original files. No big deal, Is mostly cosmetic.