2013-08-18 46 views
0

我使用位於根中的codeigniter和我的robots.txt文件,但它只能從主域訪問。搜索機器人試圖從子域(我用它的語言環境)訪問: 例子:從主域上的子域訪問文件robots.txt?

my.com/robots.txt - OK 
en.my.com/robots.txt - FAIL 

如何從xx.my.com/robots.txt重定向到my.com/robots.txt? 謝謝。

回答

0

嘗試使用RedirectMatch

RedirectMatch 301 /robots.txt http://my.com/robots.txt