redirect all but AwStats

Using a single web hosting account to host multiple sites

redirect all but AwStats

Postby smap » Wed Nov 22, 2006 4:47 pm

I'm using .htaccess in my web root to globally redirect domaina to domainb:

Code: Select all
RewriteEngine on
RewriteRule (.*) http://domainb.com


However I would like to exclude AwStats (/cgi-bin and /icon) from that global redirect.

Ideally I'd really like http://domaina.com/stats to redirect to http://domaina.com/cgi-bin/awstats.pl?c ... omaina.com.
smap
 
Posts: 9
Joined: Wed Nov 22, 2006 4:34 pm

Postby richardk » Thu Nov 23, 2006 10:25 am

Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^stats/?$ /cgi-bin/awstats.pl?config=domaina.com [R=301,L]
RewriteRule !^(stats/?|cgi-bin(/.*)?)$ http://www.domainb.com%{REQUEST_URI} [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 32 guests

cron