Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2014-08-19 10:50:18

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

Re: htaccess suggestions

Nope, that also stops searches when executed within txp:(


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

Offline

#14 2014-08-19 13:34:55

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: htaccess suggestions

Schucks. Hmm.

If you remove the ?$ so that you get RewriteCond %{QUERY_STRING} m\=any(&q\=1)? [NC] you should at least be able to conduct searches and will catch ?m=any, ?m=any&q=1 but not ?m=any&q= i.e. a search with no query string. If that also interrupts txp’s search function, I wonder if something else is at play…


TXP Builders – finely-crafted code, design and txp

Offline

#15 2014-08-19 15:53:19

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

Re: htaccess suggestions

no:)
Thanks for all this Julian, It’s a real hair puller.


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

Offline

#16 2014-08-19 16:58:12

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: htaccess suggestions

colak wrote #283059:

(…) It’s a real hair puller.

Or hair-raising.

;-)

Last edited by GugUser (2014-08-19 17:01:44)

Offline

#17 2014-08-19 23:56:10

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

Re: htaccess suggestions

Based on Pete’s reply, what about this?

RewriteCond %{QUERY_STRING} m=any&q=1 [OR]
RewriteCond %{QUERY_STRING} m=any&q= [OR]
RewriteCond %{QUERY_STRING} m=any [NC]
RewriteRule ^ - [F]
I’ve added the [OR] flag and removed the (unnecesary?) escaping \

Maybe this shorter version could work too:

RewriteCond %{QUERY_STRING} m=any(&q=1?)? [NC]
RewriteRule ^ - [F]

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#18 2014-08-20 05:16:12

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

Re: htaccess suggestions

Both of the above return the same errors as all previous ones. ie they prevent searches from within txp by generating a 403.


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

Offline

#19 2014-08-21 15:28:14

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

Re: htaccess suggestions

Here’s a couple of solutions which semi work:)

<files /?m=any&q=|/?m=any=|/index.php?s=|/?m=any&q=1|>
order allow,deny
deny from all
</files>

and

<FilesMatch /?m=any&q=|/?m=any=|/index.php?s=|/?m=any&q=1|>
order allow,deny
deny from all
</FilesMatch>

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