Report this

What is the reason for this report?

.htaccess config to Nginx?

Posted on May 15, 2017

I am trying to change those Apache rewrite rules to Nginx, but auto converter fails. And I am not very good at them. Can anyone help please?

RewriteEngine On  RewriteBase /  RewriteCond %{HTTP:X-HTTPS} !1  RewriteCond %{REQUEST_URI} !^/exchange_1С_Opencart.php$  RewriteCond %{REQUEST_URI} !^/TEMP$  RewriteRule ^(.)$ https://%{HTTP_HOST}/$1 [R=301,L]  RewriteCond %{HTTP:X-HTTPS} 1 [NC]  RewriteCond %{REQUEST_URI} ^/exchange_1С_Opencart.php$  RewriteCond %{REQUEST_URI} ^/TEMP$  RewriteRule ^(.)$ http://%{HTTP_HOST}/$1 [R=301,L]    2 variant

RewriteEngine On RewriteBase / RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} !^/exchange_1С_Opencart.php$ [NC] RewriteCond %{REQUEST_URI} !^/TEMP$ [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L,QSA] RewriteCond %{SERVER_PORT} 443 RewriteRule ^(/exchange_1С_Opencart.php)$ http://%{HTTP_HOST}/$1 [R=301,L,QSA] RewriteRule ^(/TEMP)$ http://%{HTTP_HOST}/$1 [R=301,L,QSA]

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.