admin管理员组文章数量:1122846
I am using wordpress with woocommerce and I just got a new domain and I have already migrated the old website to the new domain. My issue is am trying to redirect any one who visited any content on the old domain to the same content on the new domain.
The reason so that if a client visited the old path from an old link he would be redirected to the new domain but not the homepage.
I have tried some htaccess codes but they just redirect the client to new domain homepage.
Thanks
I am using wordpress with woocommerce and I just got a new domain and I have already migrated the old website to the new domain. My issue is am trying to redirect any one who visited any content on the old domain to the same content on the new domain.
The reason so that if a client visited the old path from an old link he would be redirected to the new domain but not the homepage.
I have tried some htaccess codes but they just redirect the client to new domain homepage.
Thanks
Share Improve this question edited May 7, 2024 at 15:25 Najm Aldekhel asked May 7, 2024 at 10:13 Najm AldekhelNajm Aldekhel 32 bronze badges1 Answer
Reset to default 1<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomin\.com
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
</IfModule>
This is what you're looking for, before the WP block in your .htaccess.
本文标签: pluginsRedirect OLDPath to NEWURLPath
版权声明:本文标题:plugins - Redirect OLDPath to NEWURLPath 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736307802a1933438.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论