I want to change the RewriteBase depending on the domain. In a perfect world I would do this in the .htaccess itself. But my understanding is that this is impossible.
The problem is that I have a local git repo and a repo on our dev server. The repo on the dev server is within a subfolder (example.com/mysite) while localy its just example.lo.
So on the server I have to set the RewriteBase to /mysite
My question then is, what is the best sollution to solve this? We can use git hooks to trigger a bash script on the bare server repo.
Will it work to add the .htaccess to the .gitignore when the repo is --bare and using this post receive hook?:
#!/bin/sh
GIT_WORK_TREE=/Users/Admin/Sites/mysite git checkout -f
Drop in a comment if Im unclear about anything. All help is appreciated!