Page 1 of 1

Mod_rewrite and folders under Serendipity

Posted: Wed Oct 11, 2006 10:08 pm
by bdconnolly
Got a tricky mod_rewrite question. I am using mod_rewrite in Serendipity. So for program scripts in subfolders I've just been turning it off.

Code: Select all

RewriteEngine Off
DirectoryIndex index.php
But now I am having a bear of a time with ajchat. It uses mod_rewrite.

Code: Select all

# BEGIN ajchat

DirectoryIndex index.php

<Files *.inc.php>
    deny from all
</Files>

RewriteEngine on
RewriteRule  ^help/?(.*)$$  help.php
RewriteRule  ^chat/?(.*)$$  chat.php
RewriteRule  ^schat/?(.*)$$  schat.php

php_flag register_globals off

# END ajchat
I get the landing page alright but when I log in it just kicks me back to the serendipity index.

Thoughts?

Re: Mod_rewrite and folders under Serendipity

Posted: Wed Oct 11, 2006 11:02 pm
by garvinhicking
Hi!

Hm, it seems your ajax chat tool is inheritng the mod_rewrite rules from the s9y .htaccess.

One solution would be to install the chat outside of the serendipity tree, maybe in a seperate subdomain.

The othe rsolution would be to clear out all other rewrite rules that s9y sets, but I don't know how to do that. Maybe you could have a look at a generic Apache server forum, people there are much smarter in that regard? *g*

HTH,
Garvin

Posted: Wed Oct 11, 2006 11:29 pm
by bdconnolly
Well, if you cannot do it... it cannot be done. Or better said... isn't worth the trouble.

Oh well.

Thanks Garvin.

BC

Posted: Wed Oct 11, 2006 11:31 pm
by garvinhicking
Hi Brian!

Hm, how about the subdomain solution, would that work?

Another trick that COULD work:

Create a subdirectory "chat", where you put the "RewriteEngine Off" .htaccess. Inside 'chat' create your 'ajchat' subdirectory, and there you put the .htaccess which turns the rewrite engine on. Thius might bypass the rules of the s9y .htaccess...?

HTH,
Garvin