mydomain.com/MyFolder/parameter-1
I have this htaccess RewriteRule -
RewriteRule ^([a-z0-9\-]+)/?$ index.php?c=$1 [NC,L]
The .htaccess file is inside MyFolder
and this only accept a single parameter.
How can do a RewriteRule to accept 2 parameters
mydomain.com/MyFolder/parameter-1/parameter-2
Thanks
use this:
RewriteEngine On
# mydomain.com/MyFolder/parameter-1
RewriteRule ^([a-z0-9\-]+)/?$ index.php?c=$1 [NC,L]
# mydomain.com/MyFolder/parameter-1/parameter-2
RewriteRule ^([a-z0-9\-]+)/([a-z0-9\-]+)/?$ index.php?c=$1&d=$2 [NC,L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With