Conf or .htaccess - when to use which one?

Apache url rewriting logic can be written in either the conf file or the .htaccess file. Which one is more appropriate for what occasion? And let's say I have a .htaccess in my internet root directory and I have a conf file defined in the Apache / conf directory and which file will be the first the first time?

0


a source to share


3 answers


To address just one part of your question: if you don't need the increased flexibility of a file .htaccess

across directories, don't use them; they slow down the processing of requests.



+2


a source


The .htaccess file is located in the root folder and can be easily copied to another destination along with the web pages. The Conf file may not always be available in the hosted environment.



+1


a source


The mod_rewrite directives of the .conf file are created first - before the URL-to-filename translation phase. But in most cases this difference will be minimal. There are performance considerations, but they do affect very heavily loaded sites or low-powered hardware.

0


a source







All Articles