2016-01-15 120 views
0

我遇到了.htaccess問題。我有兩個網站,一個在主根文件夾中,另外一個在根/子域中。重定向到子域的問題.htaccess

我的.htaccess處理子域:這是我遇到

RewriteCond %{HTTP_HOST} ^sub\.domain\.com [NC] 
RewriteCond %{REQUEST_URI} ^/$ 
RewriteRule ^(.*)$ /sub.domain.com/ [R=301,L] 

問題是,URL看起來像: https://sub.domain.com/sub.domain.com/

我想隱藏通過.htaccess中sub.domain.com。

另外我想提一下http上的一切工作正常。

你能幫我嗎?

回答

0

能否請您嘗試添加按照您的子域的.htaccess文件的代碼並重新進行檢查

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] 
+0

遺憾的是它並不能幫助。 ; < – Maciej