Given the following rewrite rule:
RewriteRule ^user/([^/]*)$ /userprofile.php?user=$1 [L]
How can I have it work either with or without a trailing slash?
Bonus points, how can I verify
([^/]*) contains only numerals?
migrated from serverfault.com Feb 26 '11 at 23:12
This question came from our site for system and network administrators.
The above rule should match on these conditions:
It will not match:
For extra credit, you can even use this:
Which tells it to match numbers between one and nine digits (the