Mod_rewrite and folders under Serendipity

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
bdconnolly
Regular
Posts: 140
Joined: Tue Apr 04, 2006 9:37 pm

Mod_rewrite and folders under Serendipity

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Mod_rewrite and folders under Serendipity

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bdconnolly
Regular
Posts: 140
Joined: Tue Apr 04, 2006 9:37 pm

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply