Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-10-30 12:00:56

hvdkooij
New Member
From: NL, Near Delft
Registered: 2013-10-09
Posts: 8
Website

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

#3 2013-10-30 14:03:48

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#4 2013-11-01 14:35:16

hvdkooij
New Member
From: NL, Near Delft
Registered: 2013-10-09
Posts: 8
Website

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

Board footer

Powered by FluxBB