Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17788

Nginx rewrite query parameters (xpost r/nginx)

$
0
0

I have a WordPress website running and I want to rewrite /feed, /rss and /rss2 to feedpress, including trailing slashes and everything people throw behind the URI as a typo or whatever. So I did this and it works fine:

rewrite ^/feed/?$ http://feedpress.me/example redirect; rewrite ^/rss/?$ http://feedpress.me/example redirect; rewrite ^/rss2/? http://feedpress.me/example redirect; 

But I don't want to rewrite this:

 http://www.example.com/feed/?post_type=something 

How do I go about this?

Thanks.

submitted by stroopwafel26
[link][5 comments]

Viewing all articles
Browse latest Browse all 17788

Trending Articles