Adding a condition for the RewriteBase rewrite

If the rewrite base is already specified and you want to modify it, change the path based on input.