Issue
I have develop machine, which is windows and I will deploy my website to an ubuntu server. so, how can one .htaccess file use different directive under different environment.
for example:
php_value auto_prepend_file D:\123\bigsite\include\global.php
in ubuntu, i should replace the value with another location.
I use svn and a post hook to automaticlly check out files to ubuntu server, so when i check in to svn, the .htaccess content is the same in the windows
Solution
Your .htaccess file will work the same on Windows or Linux so long as you have Apache set up the same.
You can of course have one .htaccess file on your dev machine and another with different settings on your production server, just remember not to overwrite them by mistake. If you are using svn then you should add .htaccess to the ignore list.
For example if the .htaccess file on your windows machine has the line:-
php_value auto_prepend_file D:\123\bigsite\include\global.php
Then the .htaccess file on your ubuntu machine may be:-
php_value auto_prepend_file /srv/123/bigsite/include/global.php
http://httpd.apache.org/docs/current/howto/htaccess.html
Answered By - vascowhite
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.