homepage Welcome to WebmasterWorld Guest from 54.243.23.129
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
conditional in htaccess
EvertVd




msg:4436611
 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
</FilesMatch>

 

g1smd




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

No.


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.

EvertVd




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

Too bad. Thanks.

g1smd




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

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

EvertVd




msg:4436667
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved