I have the following rule to rewrite URLs which works for single word parameters. However, it doesn't work if there is a "-" in the variable. How can I modify this to accomplish this?
Old URL:
domain.com/medications/?drug=medication-title
New URL:
domain.com/medications/medication-title
RewriteRule ^medications/([^/d]+)/?$ medications/?drug=$1 [QSA]
Like I said, it works when there is no "-" in the name, but need it to handle all passed parameters.
Thanks for your help.