Welcome to WebmasterWorld Guest from 54.198.90.50

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

htaccess or httpd.conf?

     
1:11 pm on May 20, 2003 (gmt 0)

New User

10+ Year Member

joined:May 19, 2003
posts:10
votes: 0


Hi,

Simple question :) Which is better for the server/browsers, to put commands like redirects in httpd.conf or .htaccess?

Thanks.

1:21 pm on May 20, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 1, 2002
posts:1422
votes: 0


httpd.conf is better.
It's only processed when you restart apache.
.htaccess is processed with every request (to check if the timestamp has changed).

It's got nothing to do with browsers.

1:23 pm on May 20, 2003 (gmt 0)

New User

10+ Year Member

joined:May 19, 2003
posts:10
votes: 0


Sorry, when I said browsers, I meant users browsing the sites :) Apologies.
10:01 pm on May 20, 2003 (gmt 0)

Senior Member

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

joined:Mar 31, 2002
posts:25430
votes: 0


Ian_W,

I think .htaccess is better for development. If you have a lot of complex rules to develop, get them working and tweaked-up in .htaccess, and then modify them and move them to httpd.conf. This saves a lot of server restarts.

I absolutely agree that httpd.conf is the best place to put them once they're working - if you have that option.

Jim

8:01 am on May 21, 2003 (gmt 0)

New User

10+ Year Member

joined:May 19, 2003
posts:10
votes: 0


Thanks to you both - much appreciated.