Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2026-04-08 20:48:39

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 283
Website Mastodon

Apache redirect not working

My .htaccess has the following gem:

RewriteCond %{ENV:reject} "T"     
RewriteRule "\.(jpg|png|svg|ico|pdf|xls|ods|webm|xml)" images2/pixel.$1   [L]
RewriteCond %{ENV:reject} "T"     
RewriteRule "^(rss|atom)"                              images2/pixel.$1   [L]
RewriteCond %{ENV:reject} "T"     
RewriteRule .*                                         index.php?s=tarpit [L]

In English, if the variable “reject” has a “T” (LLM crawlers), then the rules run. The first redirects images (and works fine). The last rule catches everything that got through the first two rules (and works fine). The middle rule not only does not redirect, but the rss and atom feeds drop past the next rule, go to Textpattern, and return the real Textpattern feeds. All the files in “images2” exist.

Any clue what’s up?

Last edited by skewray (2026-04-08 20:48:54)

Offline

#2 Yesterday 04:54:17

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

Re: Apache redirect not working

Try

RewriteCond %{ENV:reject} =T
RewriteRule \.(jpg|png|svg|ico|pdf|xls|ods|webm|xml)$ images2/pixel.$1 [L]
RewriteCond %{ENV:reject} =T
RewriteRule ^(rss|atom)$ images2/pixel.$1 [L]
RewriteCond %{ENV:reject} =T
RewriteRule .* - [F]

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

Offline

#3 Yesterday 20:38:42

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 283
Website Mastodon

Re: Apache redirect not working

You mean as an experiment? What is your logic in disabling the tarpit?

Offline

Board footer

Powered by FluxBB