[英]301 redirects of subpages
There are lots of questions about these redirects but it didn't worke for me. 关于这些重定向有很多问题,但对我没有用。
We are moving a site to another domain and we would like to redirect all links to the new domain, including sub pages. 我们正在将网站移至另一个域,我们希望将所有链接重定向到新域,包括子页面。
I'm using hostgator so I made the 301 redirect from the cPanel but only the front page goes to new domain www.etilerprep2go.com --> www.iqworldinc.com etilerprep2go.com --> www.iqworldinc.com 我正在使用hostgator,因此我从cPanel进行了301重定向,但仅首页转到了新域www.etilerprep2go.com-> www.iqworldinc.com etilerprep2go.com-> www.iqworldinc.com
But we also need the subpages to redirect too because of google ranks etc. i mean we want this link http://www.etilerprep2go.com/egitimlerimiz-etiler-ingilizce-kursu/ should go to http://www.iqworldinc.com/egitimlerimiz-etiler-ingilizce-kursu/ 但是,由于Google排名等原因,我们也需要重定向子页面。我的意思是我们希望此链接http://www.etilerprep2go.com/egitimlerimiz-etiler-ingilizce-kursu/应该转到http://www.iqworldinc。 com / egitimlerimiz-etiler-ingilizce-kursu /
Well I couldn't manage that. 好吧,我无法解决。 at the moment the code is looks like this at the end of htaccess:
目前,代码在htaccess的末尾是这样的:
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^(.*)$ "http\:\/\/www\.iqworldinc\.com\/$1" [R=301,L]
Any advice how to do that? 有什么建议怎么做?
Thanks in advance. 提前致谢。
edit: I managed to do that by adding all the categories and other pages manually as; 编辑:我设法通过手动添加所有类别和其他页面来做到这一点;
Options +FollowSymLinks
RewriteEngine on
RedirectMatch ^/$ http://www.iqworldinc.com
Redirect 301 /hakkimizda-etiler-levent-ingilizce-kursu http://www.iqworldinc.com/hakkimizda-etiler-levent-ingilizce-kursu
RedirectMatch 301 ^/egitimlerimiz-etiler-ingilizce-kursu/(.*)$ http://www.iqworldinc.com/egitimlerimiz-etiler-ingilizce-kursu
RedirectMatch 301 ^/etiler-ingilizce-kursu-iletisim/(.*)$ http://www.iqworldinc.com/etiler-ingilizce-kursu-iletisim
RedirectMatch 301 ^/etiler-ingilizce-kursu-haberler/(.*)$ http://www.iqworldinc.com/etiler-ingilizce-kursu-haberler/
RedirectMatch 301 ^/etiler-is-ingilizcesi/(.*)$ http://www.iqworldinc.com/etiler-is-ingilizcesi/
RedirectMatch 301 ^/etiler-ielts-kursu/(.*)$ http://www.iqworldinc.com/etiler-ielts-kursu/
But I still wonder is there any way to do all the pages in a codeline. 但是我仍然想知道有没有办法在代码行中处理所有页面。
This will transfer the vistitors and your SEO 这将转移访问者和您的SEO
RewriteEngine on
RewriteCond %{HTTP_HOST} etilerprep2go.com
RewriteRule ^(.*)$ http://www.iqworldinc.com/$1 [R=301,L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.