我想将所有网址从旧域名 http://olddomain.com 重定向到新域名 http://newdomain.com,并保持页面内容不变。也就是说,像下面这样的URL:
http://olddomain.com/home/category/page.html
http://olddomain.com/home/mybook/page2.html
http://olddomain.com/login
should be 301 redirect to the new newdomain but same pages, like below
http://newdomain.com/home/category/page.html
http://newdomain.com/home/mybook/page2.html
http://newdomain.com/login
这是我目前在我的.htaccess文件中拥有的内容
RewriteEngine on
RewriteCond $1 !^(index\.php|img|public|robots\.txt) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
请帮助我以简明的方式完成这个任务,并详细解释,因为我是新手。还有,有人知道搜索引擎需要多长时间才能将我的旧域名的参考资料移除吗?我的意思是在搜索查询中,旧域名的URL应该被新域名的URL替换... 旧域名应该从搜索引擎中消失。