Razva Posted September 25, 2018 Share Posted September 25, 2018 (edited) Hey, Our old NGINX configuration was using this in order to rewrite URLs in a "friendly form": rewrite ^/announcements/([0-9]+)/[a-zA-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-zA-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; and/or location ~ /account/announcements/?(.*)$ { rewrite ^/(.*)$ /account/index.php?rp=/announcements/$1; } location ~ /account/downloads/?(.*)$ { rewrite ^/(.*)$ /account/index.php?rp=/downloads/$1; } location ~ /account/knowledgebase/?(.*)$ { rewrite ^/(.*)$ /account/index.php?rp=/knowledgebase/$1; } Unfortunately these rules don't seem to be generally valid any more. For example "Setup -> Sign-In Integrations" is not working. I've noticed that current/modern 7.6+ installs have a totally different .htaccess structure, as follows: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$ RewriteRule ^.*$ %2index.php [QSA,L] Can anybody provide some newer NGINX rules, based on the above 7.6+ rewrites? Thanks you! Edited September 25, 2018 by Razva 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 26, 2018 Share Posted September 26, 2018 @wired420 posted a thread last weekend that you might find useful.... ... i've no personal experience whether it works or not, but you could update that thread either way to let others know. 1 Quote Link to comment Share on other sites More sharing options...
Razva Posted September 26, 2018 Author Share Posted September 26, 2018 2 hours ago, brian! said: @wired420 posted a thread last weekend that you might find useful.... ... i've no personal experience whether it works or not, but you could update that thread either way to let others know. Thanks for your reply. Unfortunately that topic states the same rewrite rules (plus some general configs) as I've stated in the initial post. What we need at this point is a complete rework of the NGINX rules that were used until recently. 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.