How to test for < and > characters
3 posts
• Page 1 of 1
How to test for < and > characters
Hi, I have searched high and low on how to do this. I need to test the uri and query string for the "<" and ">" characters and can't seem to do this. Right now I have:
RewriteCond %{QUERY_STRING} (?:\<) [NC]
RewriteRule .? - [F]
RewriteCond %{REQUEST_URI} (?:\<) [NC]
RewriteRule .? - [F]
Thanks for any help,
frank
RewriteCond %{QUERY_STRING} (?:\<) [NC]
RewriteRule .? - [F]
RewriteCond %{REQUEST_URI} (?:\<) [NC]
RewriteRule .? - [F]
Thanks for any help,
frank
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: How to test for < and > characters
Hello,
I was able to make the following work:
this throws me GONE with no issues when requesting "/test>a". However you may look for some extra info regarding flags NE,NU here.
Regards
Andrew
I was able to make the following work:
- Code: Select all
RewriteEngine on
RewriteRule ^test>a$ - [G]
this throws me GONE with no issues when requesting "/test>a". However you may look for some extra info regarding flags NE,NU here.
Regards
Andrew
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests