Nginx rewrite with Simple Machines Forum
- by Kevin Worthington
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.