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;
mihaic
Nov 28, 2022MVP
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;
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