RewriteRule Regexp assistance

LordOfLA

Godlike!
Joined
2 Feb 2004
Messages
7,026
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?
 
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 profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back