Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite and cookies

Can't get my .cfm pages to rewrite

         

gahtour

7:00 pm on Feb 11, 2004 (gmt 0)



I am using rewrite to check for the existance of a session cookie, no cookie = no access. The rule works fine for html pages, but my coldfusion cfm pages slip right on by. Here are the conditions and rules.

RewriteCond %{HTTP_COOKIE}!frominside=yes
RewriteRule ^(.*)$ /noauth.htm [NS,L]
RewriteCond %{HTTP_COOKIE}!acceptedtos=yes
RewriteRule \.(html¦cfm) /saltos.htm [NS,L]

The first rule has been modified to be very aggressive, it used to be similar to the 2nd. But either way .cfm files dont get caught.

jdMorgan

6:24 pm on Feb 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



gahtor,

Welcome to WebmasterWorld [webmasterworld.com]!

There is no reason your rules should not be applied for cfm page requests. I'd suggest you review your .htaccess and httpd.conf code for other redirects that may allow cfm page requests to bypass your cookie check code.

Jim