URL Rewrite problem again

sunkit

Joined: 2005-08-02
Posts: 23
Posted: Tue, 2005-08-02 04:37

I have some problem when enable the url rewrite,
it can not work and direct to the wrong place.
One more problem is when enable it, the photo can not show.

link when rewrite disable
http://hkplog.com/gallery2/main.php?g2_view=core.ShowItem&g2_itemId=40

link when rewrite enable
http://hkplog.com/gallery2/sunkit/

the photo can not show
http://hkplog.com/gallery2/main.php?g2_page=1

I have found in the old post that when .htaccess file in a parent directory or in the webserver configuration will cause problem.
But I really need the other .htaccess in the parent dir because of there another plog system using it.

How can I fix this problem?

THX!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-08-02 04:42

1. have you changed / customized the rules in site admin -> rewrite, rules tab? if so, revert it to the standards
2. yes, your plog .htaccess is obviously interfering. you'd need to paste here your plog htaccess and your g2 .htaccess, without, we can't help.

 
sunkit

Joined: 2005-08-02
Posts: 23
Posted: Tue, 2005-08-02 05:17

1. I have not change anything, it active the show item and download item.

2.link of plog htaccess
http://hkplog.com/ploghtaccess.txt

link of g2 htaccess
http://hkplog.com/g2htaccess.txt

THX!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-08-02 09:12

arg, too much and i'm not a mod_rewrite wizard.

your task:
as the plog .htaccess is in a parent directory, you have to make sure that no plog rewrite rule applies to urls that start with /gallery2/ .

 
sunkit

Joined: 2005-08-02
Posts: 23
Posted: Tue, 2005-08-02 13:30

thx!

I wil try in this direction.

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Tue, 2005-08-02 14:40

sunkit, the reason why the rewrite module doesnt work is because you have the ploghtaccess in wrong place. It indicates that it's supposed to be in /plog/ (RewriteBase). I dont know plog, but this is smoething they might support (so you can have the plog app in the web root).

I suspect that you'll use G2 embedded in plog so if your standalone G2 URLs are broken it wont hurt anything. If this is the case I sugest you setup G2 embedding module for plog and then go to Gallery 2 (while embedded) -> site admin -> url rewrite -> setup. Update the embedded config for url rewrite and go to the rules tab - save the rules (please use the default v/ and d/ prefix to start with). You need to edit your ploghtaccess, move the Url Rewrite section before all the plog stuff.

If you're not going to embedd G2 in plog, do what valiant sugested.

 
sunkit

Joined: 2005-08-02
Posts: 23
Posted: Wed, 2005-08-03 09:07

THX, pelle.

I have use the virtual host of apache to direct my domain hkplog.com to the folder /plog,
and the gallery2 is in the folder /plog/gallery2.
So, the plog htaccess is in the correct place I think.

And for you solution, how can I embed gallery2 to my plog? Is there any ref. document?

THX!

I found this document, sorry for the lazy question.