I'm using the following line in my .htaccess file to create custom page stubs
RewriteRule ^([a-zA-Z0-9-/]+)$ index.php?slug=$1 [QSA]
So basically this turns my-site.com/my-fancy-url into my-site.com/index.php?slug=my-fancy-site
I need to add an additional variable onto the query string like this:
my-site.com/index.php?slug=my-fancy-site&customId=5
So I can use this URL:
my-site.com/my-fancy-url/5
Any ideas how I would alter the Rewrite rule to achieve this?
RewriteRule ^([a-zA-Z0-9-/]+)/([0-9]+)$ index.php?slug=$1&customId=$2 [QSA]
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