我使用的是當前的代碼爲example.com的.htaccess錯誤
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC,OR]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule^https://www.%1%{REQUEST_URI} [R=301,L,NE]
它讓你添加forefully https://www或https://如果你已經把萬維網。
這段代碼的問題是,即使我打電話樣亞域ex.example.com
它增加了https://www.ex.example.com
我想是的子域像這樣=>https://ex.example.com
重定向請任何人都可以給我一個有效的代碼?
這是爲什麼標記爲PHP?這與PHP無關。 –
你想讓這個'example.com'到'https:// www.example.com'和它的子域名到'http:// that.subdomain.com'嗎? –
我希望子域名像'https:// that.example.com'而不是'http' –