regex - Allow space in .htaccess url redirect -
i have redirected url special characters 400 error page using .htaccess working fine.
i redirecting way.
rewritecond %{query_string} [^\w+=&/.()-] [or] rewritecond %{request_uri} [^\w+=&/.()-] rewriterule .? /site/error/400/? [l,b,r]
i want allow spaces in query too, trying way not working.
rewritecond %{query_string} [^\w\s+=&/.()-] [or] rewritecond %{query_string} [^\w+=&/.()-\s] [or] rewritecond %{query_string} [^\w+=&/.()\s-] [or] rewritecond %{query_string} [^\w\d\s+=&/.()-] [or]
please see , suggest possible way this.
thanks.
you can use %20
space:
rewritecond %{query_string} [^\w=+&/.%20()-] [or] rewritecond %{request_uri} [^\w+=&/.()-] rewriterule ^ /site/error/400/? [l,b,r]
Comments
Post a Comment