0

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.

0

This 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.