Re: How to read external config from .htaccess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian Mearns wrote:
On Mon, Mar 2, 2009 at 2:11 AM, J. Bakshi <joydeep@xxxxxxxxxxxxxxx> wrote:
Dear list,

I have a very long .htaccess. Because the .htaccess has all the config
to block the web-graber, leaching protection , redirect rules, php.ini
setting etc.....
I like to place all the web-graber, leaching protection settings in a
external files so that .htaccess call the files and it itself stay small
and clean.
How can I achieve this ? Also that file should be protected by .htaccess
so that only .htaccess can read that file.
Is it possible to do ?

Please enlighten me.
Thanks

You can certainly do this with the main server file (httpd.conf, for
instance) using the Include directive. I'm not sure if you can do this
in an htaccess, but it's probably worth a try. You can protect the
included files from web browsing in any number of standard ways, like
a <Files> or <FilesMatch> tag. If you have access to your server
config file, search through it to see how it prevents the server from
serving up the .htaccess files. I can't remember off hand exactly what
it uses, probably Deny from all and an Order directive.

Hope that help,
-Brian

Hello,

You can not, unfortunately, use the Include directive in the .htaccess context. Perhaps you can keep one master copy of your .htaccess file, and create symlinks to it in the desired contexts?

Frank

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux