Redirecting to http if the Request_URI contains a paramater
2 posts
• Page 1 of 1
Redirecting to http if the Request_URI contains a paramater
If am trying to redirect the page to http if the request_uri contains a parameter named 'test'
My rules look like
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{REQUEST_URI} (.*)
RewriteCond %{REQUEST_URI} (?test)
RewriteCond %{HTTPS} on
RewriteRule .? http://%1%2 [R,L]
but some how it's not working.
any idea
My rules look like
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{REQUEST_URI} (.*)
RewriteCond %{REQUEST_URI} (?test)
RewriteCond %{HTTPS} on
RewriteRule .? http://%1%2 [R,L]
but some how it's not working.
any idea
Re: Redirecting to http if the Request_URI contains a parama
Hello.
You need NC flag for RewriteCond:
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{REQUEST_URI} (.*)
RewriteCond %{QUERY_STRING} test [NC]
RewriteCond %{HTTPS} on [NC]
RewriteRule .? http://%1%2 [R,L]
You need NC flag for RewriteCond:
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{REQUEST_URI} (.*)
RewriteCond %{QUERY_STRING} test [NC]
RewriteCond %{HTTPS} on [NC]
RewriteRule .? http://%1%2 [R,L]
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 18 guests