Michael.Terence Posted October 5, 2009 Share Posted October 5, 2009 The announcements and downloads rewrites are working as intended, but the knowledgebase rewrites are messed up. Here's what's happening and links to the live site. This URL should trip the first knowledgebase rewrite rule: https://my.uncorrupted.net/knowledgebase/1/DNS-Explained.html Instead, it's hitting the second rule and using $1 as the catid and this is actually the page being displayed: https://my.uncorrupted.net/knowledgebase/1/Domain-Names I've tried replacing last; with break; on the first rule, but that breaks all the rules location / { root /path/to/public_html/; index index.html index.php; rewrite ^/announcements/([0-9]+)/[a-z0-9_-]+\.html$ /./announcements.php?id=$1 last; rewrite ^/announcements$ /./announcements.php last; rewrite ^/downloads/([0-9]+)/([^/]*)$ /./downloads.php?action=displaycat&catid=$1 last; rewrite ^/downloads$ /./downloads.php last; rewrite ^/knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ /./knowledgebase.php?action=displayarticle&id=$1 last; rewrite ^/knowledgebase/([0-9]+)/([^/]*)$ /./knowledgebase.php?action=displaycat&catid=$1 last; rewrite ^/knowledgebase$ /./knowledgebase.php last; } 0 Quote Link to comment Share on other sites More sharing options...
Michael.Terence Posted October 5, 2009 Author Share Posted October 5, 2009 worked it out 0 Quote Link to comment Share on other sites More sharing options...
minadreapta Posted October 6, 2009 Share Posted October 6, 2009 can you please share if you worked it out? thanks. 0 Quote Link to comment Share on other sites More sharing options...
Michael.Terence Posted October 6, 2009 Author Share Posted October 6, 2009 can you please share if you worked it out? thanks. Certainly http://uncorrupted.net/technical-articles/whmcs-rewrite-rules-for-nginx/ 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.