If you use mod_rewrite
and you've started getting random errors in your logs that look like "rewritten query string contains control characters or spaces", it's because of a security patch that breaks using backrefs as query params if they contain spaces (and certain other special characters). For example:
RewriteRule ^foo/([^/]+)$ foo.php?page=$1 [L,QSA]
This will still work for foo/bar
but break for foo/bar%3Abaz
. You need to add the B
flag as follows:
RewriteRule ^foo/([^/]+)$ foo.php?page=$1 [L,QSA,B]