I'm trying to come up with some redirect rules that'll work on my local working directory and production. The problem being my local dev env works via "localhost/exp" where as the production works from the root of the domain "www.lorem.com".
Doing:
RewriteEngine On
RewriteCond ^rec.php /core/rec [R=301,L]
Works on production no worries, but on my local it redirects to : "localhost/core/rec", where as I want it to to be "localhost/exp/core/rec"
I'd prefer not to have to hardcode "exp" in there, so far I found the only way todo it is have seperate rules per environment, I could make it work on my local using:
RewriteEngine On
RewriteCond %{REQUEST_URI} (.*)/exp/(.*)
RewriteRule ^rec.php /exp/core/rec [R=301,L]
Appreciate any help on this one. Thanks!