php - Regular expression to exclude chars for a valid URL -
I want to create a filter which allows almost all characters but without / < >? =
I have read in some site, I shoud using posts ^^ inside, but if I try it does not work properly:
mod_rewrite:
RewriteRule ^ (user /) ([^ \ & lt; \ & gt; \? =] +) ([/]?) $ User.php? Username = $ 2 Php for verification:
return eregi ("[^ \ How do I write to set the correct filter to allow all letters, but & lt; >? = / in my range?
Can someone please alert me? Do not include some other characters on the URL string for security or compatibility?
Consider that I should work with URL: Both of these BTW, you do not use
mod_rewrite must be sufficient for PHP:
([^ / eregi () in PHP Instead, use i modifier. preg_match () instead
Comments
Post a Comment