Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect everything except /webstat 1

Status
Not open for further replies.

johnsteel

IS-IT--Management
Mar 14, 2007
1
GB
in httpd.conf I have

<VirtualHost 1.2.3.4:80>
ServerAlias example2.com
Redirect permanent / </VirtualHost>

Which is needed because the site is hosted elsewehere. This has all worked fine but I know the plesk-hosted system has been gathering webalizer stats, which you would access via But of course, the redirect sends everything to example2.com including that. So what I need is to redirect everything except /web-stat please. Thanks.

--------------------------
 
Here you go. Add this to your VirtualHost.
Code:
RewriteEngine On
RewriteLogLevel 0
RewriteCond %{REQUEST_URI} webstat$
RewriteRule !^/webstat [URL unfurl="true"]http://new.domain.com[/URL] [R,L]

M. Brooks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top