Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Can htaccess include another file?

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
Php Include Problem - I have a few php scripts which perform various database queries. I had them all in the same directory which could be viewed through my apache web server via I wanted a couple of the php scripts to be on..

Apache Server side include character limits - I was wondering if there is a way to change the character limit on a server side include. I was including a page and it cuts off at 32000 is this a default that can be changed? Any help would be great! Corey

adding document include path to working shtml config - adding document include path to working shtml config in Apache 1.3.x I have server side includes working but would like to set a path for include to look in --other than current i.e. If the #include file doesn't insist in..

newbie question about .htaccess - I have a private website folder which I would like to password protect so I have followed the on the Apache website and some other sites to write an .htaccess file. This results in a pop up box which asks for the username and password. The..

.htaccess not looked at in aliased directory - Hi all, really some help on this! All my files within obey their .htaccess fine, including LIMIT commands and php_flag settings. However, I have an Alias in my like this... Alias ..
Next:  Log actual client IPs  
Author Message
user2387

External


Since: Jul 22, 2003
Posts: 6



(Msg. 1) Posted: Fri Jul 25, 2003 1:25 am
Post subject: Can htaccess include another file?
Archived from groups: alt>apache>configuration (more info?)

Hi,

I want to achieve something like this. Imagine I have a file called
textfile_ips.txt which contains a whole bunch of IP addresses which I want
to blocked, one per line. Can I do something like this?

<Files "somefile.html">
deny from textfile_ips.txt
</Files>

Obviously the above won't work. I have a PHP script which is adding new IP's
to the text file, and I don't want it to edit the htaccess file in case it
screws something up, and so I can also setup a cron job to delete the
blocked IP's at the start of each day...

--
djc

 >> Stay informed about: Can htaccess include another file? 
Back to top
Login to vote
user2387

External


Since: Jul 22, 2003
Posts: 6



(Msg. 2) Posted: Fri Jul 25, 2003 3:13 am
Post subject: Re: Can htaccess include another file? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I've noticed that RewriteMap might help but unfortunately that doesn't work
with .htaccess.

I've come up with the following solution. I am using PHP to append a new
line "deny from x.x.x.x" with the IP address to a .htaccess file in my
download folder. That way I can purge or reset the file when it is no longer
needed easily.

--
djc

 >> Stay informed about: Can htaccess include another file? 
Back to top
Login to vote
kd6lvw

External


Since: Nov 02, 2003
Posts: 31



(Msg. 3) Posted: Fri Jul 25, 2003 4:07 am
Post subject: Re: Can htaccess include another file? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 25 Jul 2003, djc wrote:
 > I've noticed that RewriteMap might help but unfortunately that doesn't work
 > with .htaccess.

This is exactly how it's implemented on my system.....

 > I've come up with the following solution. I am using PHP to append a new
 > line "deny from x.x.x.x" with the IP address to a .htaccess file in my
 > download folder. That way I can purge or reset the file when it is no longer
 > needed easily.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Can htaccess include another file? 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]