Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 Yesterday 20:48:39

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 282
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 (Yesterday 20:48:54)

Offline

Board footer

Powered by FluxBB