Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-08-18 21:13:12
- kevinpotts
- Member

- From: Ghost Coast
- Registered: 2004-12-07
- Posts: 370
TXP taking over other directories / redirects
Hi, simple problem, though I don’t know if the solution is simple. I have a TXP site using clean URLs (/section/title). However, the .htaccess redirect script seems to be taking over other physical subdirectories with a 404. For instance, this site has a directory called “stats” that now returns a TXP 404. Is there a way to tell .htaccess to ignore this one particular subdirectory?
Thanks!
Kevin
(graphicpush)
Offline
Re: TXP taking over other directories / redirects
Try adding this line above the other RewriteCond lines in the .htaccess file:
<code>RewriteCond %{REQUEST_URI} ^\/stats\/ [OR]</code>
or
<code>RewriteCond %{REQUEST_URI} ^\/stats [OR]</code>
Last edited by ruud (2006-08-18 21:59:27)
Offline
Re: TXP taking over other directories / redirects
Sometimes that behaviour is triggered, when you have error-documents specified (in your webserver-configuration) that cannot be found and lead to an additional 404. See this FAQ entry:
http://textpattern.com/faq/173/password-protected-directories-with-htaccess
Last edited by Sencer (2006-08-18 22:41:07)
Offline
#4 2006-08-19 01:15:57
- kevinpotts
- Member

- From: Ghost Coast
- Registered: 2004-12-07
- Posts: 370
Re: TXP taking over other directories / redirects
Neither of these methods work for me. I followed the other thread about this, creating a dummy HTML file called “error.html” so my .htaccess file looks like this:
<code>
ErrorDocument 401 /stats/error.htm
ErrorDocument 403 /stats/error.htm
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php </IfModule>#php_value register_globals 0
</code>
Is this correct?
Kevin
(graphicpush)
Offline