Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe and Support WebmasterWorld
Set value in httpd.conf and ask for it in .htaccess Apache 2.2 cangoou msg:4223873 1:38 pm on Oct 29, 2010 (gmt 0) Hello! One of my hosters requires to set this in the .htaccess in order to use Php5: AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php But this is destroing my local development-settings, which means using this code in the htaccess makes my local apache-server serve php-code uninterpreted. So every time I upload a site I have to uncomment these 2 lines. Any idea how to I could avoid this? My idea now was to do something like: httpd.conf: Set MyDevelopingMachine=1 .htaccess: <if !MyDevelopingMachine> AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php </if> Any idea how to do this in Apache 2.2?
jdMorgan msg:4224058 8:54 pm on Oct 29, 2010 (gmt 0)
I don't know how to do this, but even beyond this particular problem, in the long-term it would be a good idea to set up your development server identically to your production server... I hope someone else can give you a better answer for the short-term, though. <bump> Jim cangoou msg:4226035 4:12 pm on Nov 3, 2010 (gmt 0)
Thanks for your reply. It would be ideal to have an identicall set up in the development and production server, but I'm deveolping for a variety of webhosters, so I guess it's not practical to do so. I found a partial solution by testing for a module this webhoster hasn't got while it's activated on the local machines (hoping this doesn't change...).