Here is our current regex:
RewriteRule ^share/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ /v.php?v=$1&hash=$2 [L]
This isn't allowing underscores "_" - how do we get this to allow underscores?
Thank you
You can shorten your regex like this as well. Now this will allow _ also. \w is shorthand for [a-zA-Z0-9_]
RewriteRule ^share/([\w-]+)/([\w-]+)/?$ /v.php?v=$1&hash=$2 [L]
By adding _ to both expressions within the braces []:
RewriteRule ^share/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/?$ /v.php?v=$1&hash=$2 [L]
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