Including other file from a .htaccess

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-20-2005
Geoff Soper
 
Posts: n/a
Default Including other file from a .htaccess

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
  #2 (permalink)  
Old 01-20-2005
André Malo
 
Posts: n/a
Default Re: Including other file from a .htaccess

* 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
  #3 (permalink)  
Old 01-21-2005
David Efflandt
 
Posts: n/a
Default Re: Including other file from a .htaccess

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.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:41 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0