Hi guys
I am new to using mod_rewrite, but need it for a project I am currently working on.
My problem is that I have one php file for searching that reacts differently with different number of parameters like category name, city name and state…
Now problem is that system cannot differentiate different parameters and always take first parameter as category name even it is city or state name
Simply saying I want to re-write URLs as.
domain-name/search.php?catname=abc as domain-name/abc.html
domain-name/search.php?catname=abc&city=efg as domain-name/abc-in-efg.html
domain-name/search.php?catname=abc&city=efg&state=xyz as domain-name/abc-in-efg-in-wyz.html
domain-name/search.php?city=efg as domain-name/efg.html
domain-name/search.php?state=xyz as domain-name/xyz.html
Please let me know if it is possible or I can adopt any better way to achieve this…
Hope someone can help me?
Cheers