Razzera
Nov 27, 2022Nimbostratus
Solved
.htaccess to Nginx rules
My website was working fine with Apache .htaccess rules. Now I have sifted it to nginx because ofa new server. I need help to convert following apache rules to nginx directives/configurations. also,...
- Nov 28, 2022
You will need to use something like this:
rewrite regex replacement-url [flag];
Here are some examples:
https://www.digitalocean.com/community/tutorials/nginx-rewrite-url-rules
https://www.nginx.com/blog/creating-nginx-rewrite-rules/
for:
RewriteCond %{REQUEST_URI} ^(.+)\~s$ RewriteRule ^(.*) /stats.php?url=$1 [L]
could look like this:
rewrite ^(.+)\~s$ ^(.*)\/stats.php?url=$1 break;