.htaccess - Redirecting ? with htaccess -


i'm trying redirect "somepage?open=support" "support", did this:

rewritecond %{query_string} ^open=support$

rewriterule (.*) /support? [r=301,l]

but works works cases like: "site.php?1=2?open=support" not "?1=2?open=support".

i want work every & cases.

appreciate advice on issue.

by putting ^ , $ in rewritecond saying query string must equal open=support. sounds want contains open=support. like

rewritecond %{query_string} ^(|.*\&)open=support(|\&.*)$ 

note: don't double ?s in examples @ all, ignoring them. if you're allowing ? act delimiter in query string &, maybe

rewritecond %{query_string} ^(|.*[\?\&])open=support(|[\?\&].*)$ 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -