Redirect if URL contains /product/ (htaccess)

by Kevinster   Last Updated January 11, 2019 11:04 AM - source

I've tried dozens of rules in my htaccess, but none have helped me.

I have a website where I want to redirect users to a new page, based on a word in the URL.

So

https://www.example.com/product/product-1

should redirect to

https://www.example.com/product-1

Always, without exceptions. Any ideas?



Related Questions


301 Redirect cant work after apply and update

Updated September 14, 2017 19:04 PM

.htaccess redirect for one file

Updated September 28, 2017 21:04 PM

Simple .htaccess language question (redirection)

Updated October 26, 2017 12:04 PM

How do I redirect a URL with a question mark?

Updated November 23, 2017 03:04 AM

htaccess with regex not working properly!

Updated February 18, 2016 01:01 AM