Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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