I have a url like example.com/product-name.html
.
I want to redirect any URLs containing the string html
to search.php
, but I want to keep the original URL that was entered, so if it example.com/product-name.html
was redirected to search.php
, it should show example.com/product-name.html
in 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