mod rewrite - Removing special characters from query string in .htaccess -


I have come across similar questions, such as, and got similar instructions.

I have determined that I

  RewriteRule ^ (. *) & Lt; (*. *) $ / $ 1 $ 2 [L, R = 301] with the rows of RewriteRule ^ (. *) & Gt; (. *) $ / $ 1 $ 2 [L, R = 301]  

This http://domain.com/<> , but it does not not http://domain.com?a=<>

^ {. *) & Lt; (. *) $ Rewrite ^ (. *) $ / $ 1?% 1% 2 [L, R = 301] rewrite% {QUERY_STRING} ^ (. *) & Gt; (. *) $ RewriteRule ^ (. *) $ / $ 1?% 1% 2 [L, R = 301]

It did not change anything. I have also tried to escape & lt; Also> in Reggae (i.e. ^ (. *) \ & Lt; (. *) $ ).

The end result is that I am trying to achieve

http://domain.com/<whatever> Go to http://domain.com/whatever in , and

http://domain.com/a=<whatever>

& lt; is encoded % 3C and & gt; If the browser is encoded as % 3E , then your rules are as follows:

  rewrite %% {QUERY_STRING} ^ (. *? ) (?:% 3C |% 3E) (. *) $ Rewrite rule ^ (. *) $ / $ 1?% 1% 2 [L, R = 302, NE]  

This redirect will http://domain.com/?a=<whatever>&b = whatever to http://domain.com/?a=whatever&b = Whatever


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -