I have the following rewrite set up:
RewriteRule r/(.*) scripts/report.php?cp=1&id=$1
It works great to redirect mydomain.com/r/123abc but it’s redirecting all pages on the server that begin with an “r”. Does anyone know how I can make this more specific to only redirect when the url is mydomain.com/r/ ?
I should note that I need to keep this generic so I can’t include mydomain.com in the rule.
Try putting a
^/in front of yourr/(.*)rewrite rule. This would make it: