homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

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

5+ Year Member

Msg#: 4223871 posted 1:38 pm on Oct 29, 2010 (gmt 0)


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?



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

Msg#: 4223871 posted 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>



5+ Year Member

Msg#: 4223871 posted 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...).

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved