Reputation:
I want to use URL's like:
filename_ID.csv
and change the URL to script.php?id=ID
What would the regex be to catch the ID after the underscore and pass it to my script?
Upvotes: 0
Views: 243
Reputation: 164732
Assuming ID
is numeric...
RewriteRule filename_(\d+)\.csv script.php?id=$1 [L,QSA]
Upvotes: 0