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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -