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 mod_rewrite must be sufficient for PHP:

  ([^ /  

BTW, you do not use eregi () in PHP Instead, use i preg_match () instead modifier.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -