Single RewriteRule for root and subdirectory deployments? |
[eluser]jabbett[/eluser]
I have a CodeIgniter application which I need to deploy in multiple environments through the software development lifecycle (dev, test, staging, production). In the earlier environments, the software runs off a subdirectory of the web server, e.g. http://localhost/~username/index.php, and in the later environments, it runs on a dedicated web server, e.g. http://www.myapplication.com/index.php. Ideally, I'd like to include a single htaccess file that will work automatically in both environments. So far, I've been forced to change the RewriteBase value in each setting. Development Code: RewriteEngine On Production Code: RewriteEngine On Is there any way around this, or will I need to maintain unique htaccess files for each deployment? Thanks in advance. |
Welcome Guest, Not a member yet? Register Sign In |