我有一個網站 - http://bulletfootball.com/,我有一些關聯公司的合作伙伴,他們送我訪問我的網站從一些社會媒體網站,例如:ao.bulletfootball.com是我的聯盟合作伙伴的子域之一,取得了子域的託管目的地與主域相同,以便子域可以從主域獲取所有內容(內容,設計等)。我爲我的會員合作伙伴創建子域名,因爲我想跟蹤從我的會員合作伙伴處獲得的點擊量和廣告點擊量。如何停止從子域重定向到主域?
現在的問題是,當用戶去我的網站像ao.bulletfootball.com子域,然後當有人點擊他們重定向到主域的任何鏈接/職位/類別。
有一個例子我其實是想看看這個位點thecrazyfeed.com它的主域。當你訪問像sm.thecrazyfeed.com這樣的子域名的網站時,然後點擊任何鏈接/帖子/類別,然後看鏈接是與子域一起來的,這正是我想要對我的網站做什麼。
這裏是我的.htaccess文件:
# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript
text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-
icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
</IfModule>
</IfModule>
# END W3TC Browser Cache
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
感謝提前:)
嘗試通過.htaccess更改重定向 – 2015-04-01 08:23:02
您能否讓我知道在htaccess中重新定義htaccess中的哪些內容.htaccess @anant – 2015-04-01 08:25:50
重定向代碼是爲您的子域網站編寫的。只是刪除它或評論它,並嘗試。其實嘗試評論和檢查一次。 – 2015-04-01 08:29:45