Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-11-04 11:29:20

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,258
Website GitHub Mastodon Twitter

htaccess clarification

One of my sites is under attack by bots.

I’m currently blocking their ips using htaccess.

The clarification: The txp install with its htacces resides in a subdirectory. As I’m never sure as to how the htaccess works do I need to add the ‘deny’ rules both in the root and the subdirectory or is it OK to just have it in the root of the site?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2011-11-04 13:34:53

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: htaccess clarification

AFAIU, it’s ok to just have them in the root directory, as .htaccess rules are applied to subdirectories (unless specifically overridden).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2011-11-04 14:22:52

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,258
Website GitHub Mastodon Twitter

Re: htaccess clarification

Thanks Julián

Related:)

so would a txp install in a subdirectory work OK if its htaccess is in the root?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2011-11-04 14:47:13

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: htaccess clarification

Mmmm… not sure! I can’t think of any reason why it wouldn’t.
So, I’d say ‘yes’, but go, try it and tell us :)

In any case, why would you like to keep the TXP .htaccess outside (one level up) of the TXP folder?
I’d keep it there, where it belongs, and then also have the other .htaccess (the one blocking bot’s IPs) in the root.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2011-11-04 14:55:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,258
Website GitHub Mastodon Twitter

Re: htaccess clarification

maniqui wrote:

I’d keep it there, where it belongs, and then also have the other .htaccess (the one blocking bot’s IPs) in the root.

That might be the simplest as I’ll be able to update the txp file whenever the devs do:)

Thanks again.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB