I am going to rewrite the path of a url with PHP $get.
Orignal Path:
https:www.abc.com/category.php?filter_ids=21
What I want:
- https:www.abc.com/xyz can show the info.
- https:www.abc.com/category.php?filter_ids=21 will change to new path when I access it.
I have wrote this on RewriteEngine:
RewriteRule ^category\.php\?filter_ids=21$ /xyz [R=301,QSA,L]
RewriteRule ^xyz$ category.php?filter_ids=21 [QSA,L]
https:www.abc.com/xyz is work, I can see the content of the original link.
However, I don't know how to show the new path when I access the site with the original path.
Can anyone teach me more on it? Or provide a solution for me please?