Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

convert multiple Query String to seo friendly url in php

I have url Like http://somesite.com/packagemenu.php?conname=domestic-tours-packages&consubname=kerala-tours-packages

Now, i want to make it seo friendly with php code or htaccess rewriterule

my output should be look like this

http://somesite.com/domestic-tours-packages/kerala-tours-packages
like image 342
RUSHABH SHAH Avatar asked May 26 '26 09:05

RUSHABH SHAH


1 Answers

Simply apply the rewrite rule like this:

RewriteEngine On
RewriteRule    ^([^/\.]+)/([^/\.]+)$    packagemenu.php?conname=$1&consubname=$2    [NC,L]  
like image 89
Thamilhan Avatar answered May 27 '26 21:05

Thamilhan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!