You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mark McCulligh <mm...@visualtech.ca> on 2004/12/30 19:39:54 UTC

[users@httpd] Global redirect

Hi Group,

I have AWStats setup on all my sites and to access their stats they enter:
http://www.sitename.com/webstats/awstats.pl

I want to create a global redirect or something like that, that if the 
user enters:
http://www.sitename.com/reports
they are redirected to the Awstats Perl script.

I was wondering what is the best way to do this type of redirect. I do 
not what to add a redirect line to each virtualhost record but define a 
global redirect record that all sites can see.

Thanks for your help.
Mark.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Global redirect

Posted by Mark McCulligh <mm...@visualtech.ca>.
Thanks I will give that a try.

I don't need to set the config file in the querystring as it will automatically come from the domain name plus I also am using the SetEnv to force the config file.

Mark.
  ----- Original Message ----- 
  From: Sean T Allen 
  To: users@httpd.apache.org 
  Sent: Thursday, December 30, 2004 9:34 PM
  Subject: Re: [users@httpd] Global redirect


  Something like:

  RewriteRule ^/reports /webstats/awstats.pl [R]

  but awstats require a config file in the query string...

  so perhaps...

  RewriteRule ^/reports /webstats/awstats.pl?config=%{HTTP_HOST}

  assuming the http host matches up with the config file...



   

  Mark McCulligh wrote: 
    Hi Group, 

    I have AWStats setup on all my sites and to access their stats they enter: 
    http://www.sitename.com/webstats/awstats.pl 

    I want to create a global redirect or something like that, that if the user enters: 
    http://www.sitename.com/reports 
    they are redirected to the Awstats Perl script. 

    I was wondering what is the best way to do this type of redirect. I do not what to add a redirect line to each virtualhost record but define a global redirect record that all sites can see. 

    Thanks for your help. 
    Mark. 

    --------------------------------------------------------------------- 
    The official User-To-User support forum of the Apache HTTP Server Project. 
    See <URL:http://httpd.apache.org/userslist.html> for more info. 
    To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org 
      "   from the digest: users-digest-unsubscribe@httpd.apache.org 
    For additional commands, e-mail: users-help@httpd.apache.org 






------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  The official User-To-User support forum of the Apache HTTP Server Project.
  See <URL:http://httpd.apache.org/userslist.html> for more info.
  To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
     "   from the digest: users-digest-unsubscribe@httpd.apache.org
  For additional commands, e-mail: users-help@httpd.apache.org

Re: [users@httpd] Global redirect

Posted by Sean T Allen <se...@usaherbals.com>.
Something like:

RewriteRule ^/reports /webstats/awstats.pl [R]

but awstats require a config file in the query string...

so perhaps...

RewriteRule ^/reports /webstats/awstats.pl?config=%{HTTP_HOST}

assuming the http host matches up with the config file...



 

Mark McCulligh wrote:

> Hi Group,
>
> I have AWStats setup on all my sites and to access their stats they 
> enter:
> http://www.sitename.com/webstats/awstats.pl
>
> I want to create a global redirect or something like that, that if the 
> user enters:
> http://www.sitename.com/reports
> they are redirected to the Awstats Perl script.
>
> I was wondering what is the best way to do this type of redirect. I do 
> not what to add a redirect line to each virtualhost record but define 
> a global redirect record that all sites can see.
>
> Thanks for your help.
> Mark.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>