我用這個.htaccess創建了一個子域;它在我的www.example.com域上工作正常,但不在www.example.pk上。我不明白問題在哪裏。如何在重寫目錄中通過.htaccess創建子域
www.example.com
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteCond %{HTTP_HOST} ^([-a-zA-Z0-9]+)\.example\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/?index\.php$
RewriteRule ^(.*)/*([0-9]+)*$ index.php?r=list&source=product&product_get=%1&page_page=$1 [NC,QSA,L]
www.example.pk
RewriteCond %{HTTP_HOST} !^www\.example\.pk$ [NC]
RewriteCond %{HTTP_HOST} ^([-a-zA-Z0-9]+)\.example\.pk$ [NC]
RewriteCond %{REQUEST_URI} !^/?index\.php$
RewriteRule ^(.*)/*([0-9]+)*$ index.php?r=list&source=product&product_get=%1&page_page=$1 [NC,QSA,L]
我創建www.example.com域,那麼用的cPanel子域* .example.com的。這是否有必要?
服務器是否聽擺在首位的子域(虛擬主機或但是它被配置)? –
當我在www.example.pk域上配置此方法時,此錯誤出現「問題載入頁面」,但在www.example.com域上正常工作;這兩個域名託管在同一個託管 – knsmith
oyu可以給我們真實的域名來檢查嗎? –