Nginx rewrite with Simple Machines Forum
Posted
by
Kevin Worthington
on Server Fault
See other posts from Server Fault
or by Kevin Worthington
Published on 2013-10-20T21:04:02Z
Indexed on
2013/10/20
21:56 UTC
Read the original article
Hit count: 305
I am running Nginx 1.5.6 and I use the Simple Machines Forum software. Most rewrite rules seem to work properly, with the exception of the RSS feeds.
In my Nginx configuration, I have the following line which is supposed to handle URLs which contain ".xml":
rewrite ^/forum/(\.xml|xmlhttp)/?$ "/forum/index.php?pretty;action=$1" last;
The above rule produces the following URL for the main forum, which returns a 403 Error: http://www.mydomain.com/forum/.xml/?type=rss
I would like the rewrite rule to produce this type of URL, which returns code 200 (a real page): http://www.mydomain.com/forum/?type=rss;action=.xml
Here is the entire block pertaining to the forum rewrites: http://pastebin.com/raw.php?i=tZkAibW3
I would really appreciate some help to create a rewrite rule to do that. Thanks.
© Server Fault or respective owner