Merhaba
https://example.com adresini
https://www.example.com adresine nasıl yönlendirebilirim?
Kullandığım nginx ayarı şöyle:
server {
if ($host = www.koray.dev) {
return 301 https://$host$request_uri;
}
if ($host = koray.dev) {
return 301 https://$host$request_uri;
}
listen 80;
server_name koray.dev www.koray.dev;
return 404; RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L].htaccess ile yönlendirme yapabilirsiniz.
Ben nginx'de böyle yönlendiriyorum.
-----------------
server {
listen 443 ssl http2;
server_name www.koray.dev koray.dev;
if ($host ~ ^koray.dev) {
rewrite ^(.*) https://www.koray.dev$1 permanent;
}
merhaba arkadaşlar konuyu tesadüf gördüm.
https://www.r10.net/cpanel-plesk-directadmin/2806371-additional-nginx-directives-htaccess-donusturucu-tuhafliklar.html
Şu konuyu bir açtım bakıp yorumlarsanız sevinirim. htaccess ile ilgili çevirici ile bile orjinal kodu çevirdiğim halde sorun yaşadım. Belki bilgisi olan vardır teşekkür ederim