Take the 2-minute tour ×
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 stackoverflow.com Nov 4 '10 at 11:15

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

1 Answer 1

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

Your Answer


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