Forum Discussion
Razzera
Nov 27, 2022Nimbostratus
.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;
Leslie_Hubertus
Nov 29, 2022Ret. Employee
Hy Razzera, I made mihaic 's post the Accepted Solution - please let me know if it didn't actually solve your issue and i"ll revoke that status. Otherwise, I'll keep it there to make it easy for future users with the same issue to find the answer.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects