Forum Moderators: phranque

Message Too Old, No Replies

Need List of Special Characters to Escape

Need List of Special Characters to Escape

         

calvinmicklefinger

3:49 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



I am performing a RedirectMatch 302 and the target is a cgi script with a gazillion special characters in it. Where can I find a comprehensive list showing which characters need to be escaped when writing a rule in the .htaccess file?

Many thanks.

jdMorgan

4:30 am on Jul 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Any character that has meaning in regular expressions or mod_rewrite:

^$%.*+?(){}[]¦\

Note that some of these characters are illegal in URLs, query strings, or both, so you may not have to test for them, since they will never appear as "input" to the RewriteRule. Ref: RFC2396 [faqs.org]

Jim

calvinmicklefinger

12:53 pm on Jul 3, 2005 (gmt 0)

10+ Year Member



Thanks, that clarifies everything.