I have a url like example.com/product-name.html.
I want to redirect any URLs containing the string htmlto search.php, but I want to keep the original URL that was entered, so if it example.com/product-name.htmlwas redirected to search.php, it should show example.com/product-name.htmlin the browser.
I use:
RewriteCond %{REQUEST_URI} html
RewriteRule .* search.php
Redirecting, but not saving, the original URL in the browser.
How can i do this?
source
share