Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

currently in order to access statistics on my site I access this link:

all is working fine, but what I want to achieve is simply this:

I've created the "sites" directory and inside I've created the .htaccess file but without success.

Any idea?

share|improve this question

migrated from Nov 4 '10 at 11:15

This question came from our site for professional and enthusiast programmers.

2 Answers 2

I think you can solve this with mod_rewrite.

Inside your root directory (generally public_html), place a .htaccess file with the following content:

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

RewriteCond %{REQUEST_URI} ^www\.mysite\.org\/stats\/$ [NC]
RewriteRule (.*) www\.mysite\.org\/awstats\/awstats\.pl\?config=awstatsconffile\.org - [L]

I'm not good at regex, so you may need to escape/unescape some characters, but that's the way.

share|improve this answer
Not Working !!!! . . . . . . . – user13353 Feb 15 '12 at 6:13

Try something like the following in the document root's .htaccess file:

RewriteEngine On
RewriteRule ^stats/$ /awstats/ [L]

This will internally rewrite requests for /stats/ to the above URL.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.