httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Ward (darrward)" <darrw...@cisco.com>
Subject RE: [users@httpd] Mixing ReWrite and AliasMatch
Date Sun, 02 Mar 2014 23:53:48 GMT
I thought the * was required to continue regex matching a longer UserAgent field - if not then
maybe that's the problem

i.e. ^Captive   !=   CaptiveNetworkSupport-277 wispr

The entries are definitely in the right vhost but I'll be running some more testing later
this afternoon and will advise how I go

Darren

-----Original Message-----
From: Eric Covener [mailto:covener@gmail.com] 
Sent: Monday, 3 March 2014 10:05 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Mixing ReWrite and AliasMatch

On Sun, Mar 2, 2014 at 3:27 PM, Darren Ward (darrward) <darrward@cisco.com> wrote:
> Thanks
>
> Still can't get this string to be matched though
>
>     RewriteCond %{HTTP_USER_AGENT} ^CaptiveNetworkSupport*
>     RewriteRule ^(.*)$ /library/test/success.html [PT]
>
> Isn't matching:
>
> wifi-tc:192.168.104.39 - - [28/Feb/2014:11:02:42 +1100] "GET /ah66Mlma/GwaqQ1ka.html
HTTP/1.0" 200 334 "-" "CaptiveNetworkSupport-277 wispr"
> wifi-tc:192.168.104.39 - - [28/Feb/2014:11:15:08 +1100] "GET /NLHHvH2Y/Z4CXHCDW/Q9VhrIWd/x3O3upE2.html
HTTP/1.0" 200 334 "-" "CaptiveNetworkSupport-277 wispr"
>
> Logic seems ok and the regex is a simple one...

The trailing * is probably unintended.  Likely your rewrite is in the wrong vhost / unused
htaccess if it appears to never match AND you can't get trace.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message