Forum Moderators: phranque

Message Too Old, No Replies

Mod_rewite behaving differently under Revision 1.3.4

         

T_Rex

7:07 pm on Mar 17, 2005 (gmt 0)

10+ Year Member



After our webhosting service updated the revision to 1.3.4, my website came down with the htaccess file present. I had to temporarily cut htaccess back to "bare-bones" and then did some hacking to find what the problem was. I ended up moving all referrer bans from mod_access over to mod_rewrite conditions like this:

SetEnvIf referer .*\forum.* ban
Converted to this:
RewriteCond %{HTTP_REFERER} forum [OR]

That made the website come back up last November, and now I see that people are entering the site from forums again.
Rewriting one REFERER group with a
RewriteRule ^.*$ [sendumhere.com...] [R=301,L]
and rewriting a REFERER like this
RewriteRule .* - [F]
No longer work!
Odd isn’t it?
Well at least my spider trap still works.

T_Rex

8:45 pm on Mar 17, 2005 (gmt 0)

10+ Year Member



Bump
Is there a way to mod_rewite with condition based on REFERER anymore?
I need to do this with the new version.
Thanks for any ideas

sitz

9:36 pm on Mar 18, 2005 (gmt 0)

10+ Year Member



Yes. There are NUMEROUS examples of this in the archives.

jdMorgan

4:16 am on Mar 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here are some examples [webmasterworld.com] (and you can follow the link in the first post back to previous threads).

Note also that the last RewriteCond before the RewriteRule *must not* have an [OR] flag.

Jim