Вот не могу выявить где у меня этот редирект
Вот конфиги
server {
listen *.*.*.*:80;
listen *.*.*.*:443 ssl;
server_name site.net www.site.net;
error_log /var/log/httpd/domains/site.net.error.log error;
ssl on;
ssl_certificate /home/admin/web/site.net/cert/site.chained.crt;
ssl_certificate_key /home/admin/web/site.net/cert/site.key;
add_header Strict-Transport-Security 'max-age=604800';
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
#if ( $scheme = "https" ) {
# rewrite ^/(.*)$ http://$host/$1 permanent;
#}
location / {
proxy_pass http://*.*.*.*:8080;
location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|exe|pdf|doc|xls|ppt|txt|odt|ods|odp|odf|tar|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
root /home/admin/web/site.net/public_html;
access_log /var/log/httpd/domains/site.net.log combined;
access_log /var/log/httpd/domains/site.net.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
location /error/ {
alias /home/admin/web/site.net/document_errors/;
}
location @fallback {
proxy_pass http://*.*.*.*:8080;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include /home/admin/conf/web/nginx.site.net.conf*;
}
// htaccess
AddDefaultCharset utf-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.site.net
RewriteRule (.*) http://site.net/$1 [R=301,L]
RewriteCond $1 !^(index\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
Нужно просто сделать HTTPS to HTTP но не знаю как ибо через
if ( $scheme = "https" ) {
rewrite ^/(.*)$ http://$host/$1 permanent;
}
Получается циклическая переадресация