• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

RewriteRule Regexp assistance

#1
I got an apache rewrite rule as follows in a .htaccess file:

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

This came with drupal 6.2

Problem is this stops my invision forum working properly and totally prevents access to the admin side of things.

I need to change said rule to say basically:

"if the url matches /forum/* don't do anything, for everything else run the rule."

I've tried RewriteCond %{REQUEST_FILENAME} !^/forum/*

However that doesn't seem to work all the time. Any ideas?
 

JPRuss

OSNN Addict
#2
Perhaps try putting a second rewrite rule at the top of the htaccess file

RewriteRule ^/forums/(.*) /forums/$1 [L,QSA]
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

So if thie url contains /forums/ in it it should redirect to the /forms/ directory and stop processing.

I didn't get a chance to try this first, but that's the general idea
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,013
Latest member
Pdawgintown