This is a discussion on Including other file from a .htaccess within the Linux Web Servers forums, part of the Web Server and Related Forums category; Is it possible to include other configuration files from a .htaccess file under Apache? I have a number of .htaccess ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Is it possible to include other configuration files from a .htaccess file
under Apache? I have a number of .htaccess files dotted around a server with an identical chunk of code in each which I would like to be able to update centrally along with code which varies in each file. For the common chunk of code I'd like to be able to include it from a single source. I've looked at the Include directive but this doesn't seem to be availble in the context of a .htaccess file. Is there another way to do this? Thanks, Geoff |
|
|||
|
* geoff.google.nospam@alphaworks.co.uk (Geoff Soper) wrote:
> I've looked at the Include directive but this doesn't seem to be availble > in the context of a .htaccess file. Is there another way to do this? Nope. An alternative approach could be to generate them from templates locally. nd |
|
|||
|
On 20 Jan 2005, Geoff Soper <geoff.google.nospam@alphaworks.co.uk> wrote:
> Is it possible to include other configuration files from a .htaccess file > under Apache? I have a number of .htaccess files dotted around a server > with an identical chunk of code in each which I would like to be able to > update centrally along with code which varies in each file. For the common > chunk of code I'd like to be able to include it from a single source. > > I've looked at the Include directive but this doesn't seem to be availble > in the context of a .htaccess file. Is there another way to do this? If it all the same host or virtual host, an .htaccess applies to any subdirectories (unless overridden farther down). So you may be able to put some options in .htaccess higher up in your web dir tree. You just have to be careful about things that might knock out something set higher up. For example if you want to have a dir with ftp like indexing, it would be best to use something like Options +Indexing, because without the plus, it would knock out any other Options set in higher directories. |