Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Redirect http://site.com/? to http://site.com

$
0
0
Greetings!

I'd like to create redirect like http://site.com/? to http://site.com (http://site.com/? can contain anything after ?: e.g. http://site.com/?iwjekjwbefkjwe).

I've added string

rewrite /? http://site.com permanent;

to nginx config but without any success.
If I am adding string with another symbol different from question mark such as "- "

rewrite /- http://site.com permanent;

it works. How question mark could be used for this situation?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>