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

RewriteRule Regexp assistance

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?


OSNN Addict
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 ...
What a long strange trip it's been. =)

Forum statistics

Latest member