Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Exclude /stats/ directory in .htaccess?
I started with the default .htaccess file but I would like to exclude the /stats/ section from TextPattern.
This directory does not exist but it gets snatched away by Dreamhost for the webstatistiscs.
My apache skills are a bit rusty and I tried to change
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*) index.php
Into
RewriteCond %{REQUEST_URI} !=/favicon.ico [AND]
RewriteCond %{REQUEST_URI} !=/stats/.*
RewriteRule ^(.*) index.php
But is resulted in the site itself to fail.
Adding a Dummy stats directory in there did not work either.
This is obviously a case of very rusty Apache skills and I could definitly use a fresh idea.
Relates to Hugo’s website (Checkout /stats/ there for the error.)
Geek by nature, Linux by Choice.
Offline
#2 2013-10-30 12:32:08
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: Exclude /stats/ directory in .htaccess?
Add below the standard .htaccess the following line:
Redirect 301 /stats http://hugo.vanderkooij.org/
Offline
Re: Exclude /stats/ directory in .htaccess?
RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html).*$ [NC]
RewriteRule . - [L]
Put those after the RewriteEngine On
line. See DreamHost wiki for more.
Last edited by Gocom (2013-10-30 14:08:53)
Offline
Re: Exclude /stats/ directory in .htaccess?
I feel rather ….. stupid. :-)
How could I forget to check the DreamHost wiki.
Geek by nature, Linux by Choice.
Offline