หัวข้อ: https redirect บางไฟล์ (nginx) เริ่มหัวข้อโดย: mr.zatan ที่ 03 มีนาคม 2020, 14:27:13 ถ้าจะตั้งให้ https redirect บางไฟล์ ได้มัย
ไฟล์ที่ไม่อยากให้ redirect เป็น https คือ mp4 mp3 nginx: โค๊ด: server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; return 301 https://$host$request_uri; root %docroot%; index index.php index.html index.htm; access_log /var/log/nginx/domains/%domain%.log combined; access_log /var/log/nginx/domains/%domain%.bytes bytes; error_log /var/log/nginx/domains/%domain%.error.log error; location / { location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { expires max; } location / { try_files $uri $uri/ /index.php?$args; } location /ecatalogs/ { try_files $uri $uri/ /ecatalogs/index.php?$args; } |