server {
######################################################################
## Server configuration
######################################################################
listen *:443 ssl http2;
server_name 3dpaneli.ru www.3dpaneli.ru ;
root /var/www/3dpaneli.ru/web;
######################################################################
## SSL configuration
######################################################################
# recommended but not manditory directive
# leave commented out unless you know what it is doing
#more_set_headers 'Strict-Transport-Security: max-age=15768000';
ssl on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1h;
ssl_protocols TLSv1.2 TLSv1.1;
add_header Strict-Transport-Security "max-age=15768000" always;
ssl_stapling on;
ssl_stapling_verify on;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK;
ssl_certificate /var/www/clients/client19/web26/ssl/3dpaneli.ru-le.crt;
ssl_certificate_key /var/www/clients/client19/web26/ssl/3dpaneli.ru-le.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
###################################################################
RewriteCond %{HTTP_HOST} ^(www.|)(.+[^\.])\.domainname\.com/$
# с ввв и без нее, выделяем во вторую группу домен3 уровня до первой точки.
RewriteRule ^contacts$ https://www.domainname.com/contacts\?country\=%2 [L,R=301]
# не забываем экранировать спец символ \?, равно кстати тоже спец символ \= ( хотя = и так сработает)
RewriteEngine On
RewriteCond %{REQUEST_URI} (.*/[^/.]+)($|\?)
RewriteCond %{REQUEST_URI} !^/es [NC]
RewriteRule .* %1.html [R=301,L]
RewriteRule ^(.*)/$ /$1.html [R=301,L]
# 301 --- http://www.test3.com/faq.html?faq=13&layout=bob => bbq.html
RewriteCond %{QUERY_STRING} (^|&)faq\=13($|&)
RewriteCond %{QUERY_STRING} (^|&)layout\=bob($|&)
RewriteRule ^faq\.html$ /bbq.html? [L,R=301]
!
- отрицаниеRewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(default|index|main)\.(html|php|htm)\ HTTP/ [NC]
RewriteCond %{THE_REQUEST} !^тут ваша страничка/% [NC]
RewriteRule ^(([^/]+/)*)(default|main|index)\.(html|php|htm)$ https://site.ru/$1 [L,R=301]