Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Set value in httpd.conf and ask for it in .htaccess

Apache 2.2

1:38 pm on Oct 29, 2010 (gmt 0)

5+ Year Member


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:

Set MyDevelopingMachine=1

<if !MyDevelopingMachine>
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

Any idea how to do this in Apache 2.2?
8:54 pm on Oct 29, 2010 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

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>

4:12 pm on Nov 3, 2010 (gmt 0)

5+ Year Member

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...).