htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Problem with CMS/Stats
PostPosted: 26 Oct 2006 19:10 
Offline
User avatar

Joined: 25 Sep 2006 04:48
Posts: 242
Problem with /Stats

Some 3rd party apps like WordPress, Drupal will take over your directory structure to give you a nice clean url but in the process break your /stats page.

Quick Fix:
Code:
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]


* For Drupal:

Code:
# Rewrite URLs of the form 'index.php?q=x':
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/stats/(.*)$
RewriteCond %{REQUEST_URI} !^/failed_auth.html$
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


* For Mambo

Code:
# Rewrite URLS of the form 'index.php' ... mambo doesn't take the query string as a parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/stats/(.*)$
RewriteCond %{REQUEST_URI} !^/failed_auth.html$
RewriteRule ^(.*)$ index.php [L]


* For WordPress:

Code:
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]


* For Typo:

Code:
RewriteRule ^xml/([a-z]+)$ /xml/$1/feed.xml [R=301]
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/stats/(.*)$
RewriteCond %{REQUEST_URI} !^/failed_auth.html$
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]


* For MediaWiki

This depends on how you install Mediawiki and whether you use mod_rewrite to get clean URLs. If you install it correctly, /stats will not be broken. See the alternate simpler method of getting clean URLs for install instructions that do not break /stats.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB