How to redirect custom post type posts to one url with htaccess?

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.

Read more here:: How to redirect custom post type posts to one url with htaccess?

Leave a Reply

Your email address will not be published. Required fields are marked *