homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

conditional in htaccess

 10:02 am on Apr 3, 2012 (gmt 0)

I am using syncing to keep the developing and production versions of a website up-to-date. this works perfectly except for one thing: there is an instruction in the htaccess file which should run on the remote server, but not on the dev-box. It is *not* an option to exclude the htaccess from syncing.

So I was wondering if there is some condictional based on the server htaccess is on? The instruction is:

<FilesMatch "\.php$">
AddHandler x-httpd-php53.php



 10:11 am on Apr 3, 2012 (gmt 0)


You're going to have to get creative with your sync process and site config.

.htaccess.dev on the dev site runs the dev site.

.htaccess for the live site is merely stored on the dev site, unused.

You'll need to alter the dev site main config to look for .htaccess.dev instead of .htaccess here.

You'll need to manually alter both files when you make changes.

The alternative is to add that extra setting to httpd.conf and not have it in .htaccess at all.


 12:42 pm on Apr 3, 2012 (gmt 0)

Too bad. Thanks.


 1:52 pm on Apr 3, 2012 (gmt 0)

Both are do-able with the right level of server access.


 2:03 pm on Apr 3, 2012 (gmt 0)

I'll have to think a bit about how I can change the workflow (taking into account the syncing) and see what is the best method. thanks for you suggestions

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