WordPress change or remove custom post slug from url using htaccess

I’m developing a website using wordpress. I have custom post type urls like :

review/assassins-creed-iii/

But the post type name is review, but I have to rewrite this word to product

Read More
    product/assassins-creed-iii/

or

    assassins-creed-iii/

It’s ok me to remove that slug and show only the post slug

I used this htaccess code :

RewriteCond %{REQUEST_URI}  (.*)/review/(.*)
RewriteRule .* example.com/%1/product/%2  [QSA,R=301,L]

But this redirects me to 404 page. Anyone know how to change all urls as above?

Thank you

Related posts

Leave a Reply

2 comments