mod rewrite - Remove special character ? from url with .htaccess -


i redirect url:

http://www.domena.pl/?tekst,123.html

to this

http://www.domena.pl/tekst,123.html

i want remove ? after first /, redirect every url domena/?...... domena/......

i using htaccess , works domena/testtekst,123, don't know how should change work special character ?

rewritecond %{http_host} ^www.domena.pl$ rewritecond %{request_uri} ^/test(.*)$ rewriterule ^test(.*)$ http://www.domena.pl/$1 [l,r=301]  

this not work:

rewritecond %{http_host} ^www.domena.pl$ rewritecond %{request_uri} ^/?(.*)$ rewriterule ^?(.*)$ http://www.domena.pl/$1 [l,r=301]  

and doesn't work too:

rewritecond %{http_host} ^www.domena.pl$ rewritecond %{request_uri} ^/\?(.*)$ rewriterule ^\?(.*)$ http://www.domena.pl/$1 [l,r=301]  

you can use:

rewriteengine on  rewritecond %{the_request} ^[a-z]{3,}\s/+\?([^\s&]+) [nc] rewriterule ^ /%1? [r=302,l,ne] 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -