admin管理员组文章数量:1122832
I have a custom post type "products". I would like to redirect all posts from "products" to one url ex: using htaccess.
For example: , and to be on link click redirected to one page
Options +FollowSymLinks RewriteEngine On RewriteRule ^products/(.*)$ / [R=301,L]
I cant find this topic anywhere. Please help.
I have a custom post type "products". I would like to redirect all posts from "products" to one url ex: http://example.com/page1 using htaccess.
For example: http://example.com/products/post1, http://example.com/products/post2 and http://example.com/products/post3 to be on link click redirected to one page http://example.com/page1
Options +FollowSymLinks RewriteEngine On RewriteRule ^products/(.*)$ /http://example.com/page1 [R=301,L]
I cant find this topic anywhere. Please help.
Share Improve this question asked Mar 2, 2018 at 10:17 dandicarskidandicarski 11 Answer
Reset to default 0This answer from Webmaster StackExchange might be helpful:
RewriteRule ^products/ /page1/ [R=301,L]
Goes after the RewriteEngine
and RewriteBase
rules, but above all the other WordPress stuff.
If you don't want to fiddle with the .htaccess
, you can have a look at the Redirection plugin.
本文标签: How to redirect custom post type posts to one url with htaccess
版权声明:本文标题:How to redirect custom post type posts to one url with htaccess? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736287424a1927877.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论