Reputation: 11615
I'm trying to write a htaccess file for the following URL to be parsed.
/folder/title-of-article/id=6
to be passed to-
/page.php?id=6
How do I do this?
Upvotes: 0
Views: 32
Reputation: 7866
Assuming your article title cannot contain slashes, You can use this:
RewriteEngine On
RewriteRule ^folder/[^/]+/id=([0-9]+)$ /page.php?id=$1
This will match /folder/<anything not containing slashes>/id=<digits>
Upvotes: 1