2017-08-05 106 views
0

我一直在轉發我的域名scotnery.com jugglegood.com很長一段時間。現在,我想在scotnery.com(索引頁面)上用css,img和js託管一個頁面。我想將所有其他請求重定向到jugglegood.com,因爲有些網站可能鏈接到「scotnery.com/tv」,我想將它發送到「jugglegood.com/tv」重定向所有,但幾個請求

這裏是我當前的htaccess文件在scotnery.com這不是爲我工作和看似複雜

RewriteEngine on 
RewriteCond %{REQUEST_URI} !^/img/.* 
RewriteCond %{REQUEST_URI} !^/img$ 
RewriteCond %{REQUEST_URI} !^/css/.* 
RewriteCond %{REQUEST_URI} !^/css$ 
RewriteCond %{REQUEST_URI} !^/js/.* 
RewriteCond %{REQUEST_URI} !^/js$ 
RewriteCond %{REQUEST_URI} !^/img/.* 
RewriteCond %{REQUEST_URI} !^/img$ 
RewriteCond %{REQUEST_URI} !^/(index|other-page)\.php 
RewriteCond %{REQUEST_URI} !^/ 
RewriteRule .* http://jugglegood.com/ [R=301,L] 

回答

0

下面是導致htaccess文件的內容。一位朋友幫助我...

RewriteEngine On 
RewriteCond %{REQUEST_URI} !(\.png|\.jpg|\.gif|\.jpeg|\.bmp|\.css|\.js|index\.php)$ 
RewriteCond %{REQUEST_URI} !^/$ 
RewriteRule (.*) http://jugglegood.com/$1 [R=301,NC,L]