[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Apache mod_rewrite



> -----Mensaje original-----
> De: teixi@island.6tems.com [mailto:teixi@island.6tems.com]En nombre de
> Jaume Teixi
> Enviado el: lunes, 04 de septiembre de 2000 20:20
> Para: Craig Sanders
> CC: Debian User; debian-isp@lists.debian.org
> Asunto: Re: Apache mod_rewrite
> Importancia: Alta
>
>
> I'm still getting 404  RewriteLog shows:
>
> ' pattern='^www\.[^.]+$' => not-matched
>
> whats happening ?
>
> thanks,
> jaume.

	'^www\.[^.]+$' never will match 'www.domain.com'

Try:

	RewriteEngine	on
	RewriteCond		%{SERVER_NAME}	^www\.[^.]+\.[a-z]+$
	RewriteRule		^/(.*)$		/%1/$1  [C]
	RewriteRule		^www\.(.*)/stats	/var/reports/$1

>
> Craig Sanders wrote:
>
> > On Wed, Aug 30, 2000 at 10:18:14PM +0000, Jaume Teixi wrote:
> > > I need to do the following in order to access stats for each based
> > > virtual host
> > >
> > > when typing url   www.virtualhost1.com/stats  or
> > > www.virtualhost99.com/stats
> > > server page located under  /var/reports/virtualhost1   or
> > > /var/reports/virtualhost99
> > >
> > > I've tryed on my httpd.conf:
> > >
> > > RewriteEngine   on
> > > RewriteCond     %{HTTP_HOST}    ^www\.[^.]+$
> > > RewriteRule     ^(.+)           %{HTTP_HOST}$1  [C]
> > > RewriteRule     ^www\.([^.]+)(.*)/stats    /var/reports/$1
> > >
> > > Apache produces a 404
> > >
> > > any points to fix this ?
> >
-----------------------------------8<-----------------------------------
/ Joaquin Ferrero                        Linux User #109.802
| explorer@joaquinferrero.com            Cartelera de Cine de Valladolid
\ explorer@pucela.net                    http://Pucela.Net/Cultura/Cine

/ Asesora y Proveedora                   aprosi@aprosi.net
\ de Servicios de Internet, S.L.         aprosi@pucela.com
-----------------------------------8<-----------------------------------





Reply to: