php - htaccess rewrite url parameter -


i want redirect

http://localhost:8080/mypproject/?supplier=test123

to

http://localhost:8080/myproject/?product_cat=test123

but don't know how...

you can use code in /myproject/.htaccess file:

rewriteengine on rewritebase /myproject/  rewritecond %{query_string} ^supplier=([^&]+) [nc] rewriterule ^/?$ ?product_cat=%1 [l,r=301] 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -