Reputation: 1764
I'm looking for the regex url rewriting entries for .htaccess - specifically, I'd like a way to re-write:
/site/this-is-my-slug/
to
/site/?slug=this-is-my-slug
Is this possible?
Upvotes: 2
Views: 1861
Reputation: 36955
Try this:
RewriteRule ^site/(.*)$ site/?slug=$1 [L,QSA]
The QSA
flag will copy over any query string from your original URL request so remove it if you don't want this functionality.
Upvotes: 4