[Novalug] rewrite module
Miguel Gonzalez
miguel_3_gonzalez@yahoo.es
Mon Feb 26 18:37:16 EST 2007
Now it works, it was an issue not related with this, but with the developer web files
Many thanks to all and sorry
Miguel
----- Mensaje original ----
De: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
Para: eric@alliances.org
CC: novalug@calypso.tux.org
Enviado: lunes, 26 de febrero, 2007 16:49:35
Asunto: Re: [Novalug] rewrite module
Just in case I am missing something here it is the complete .htaccess file:
# Protect files & folders
Order Deny,allow
<FilesMatch "\.ht(access|passwd)$">
Deny from all
</FilesMatch>
<Files ~ "(\.(includes|tmp))$">
Order deny,allow
Deny from all
</Files>
# Protect files & folders
Order Deny,allow
<FilesMatch "\.ht(access|passwd)$">
Deny from all
</FilesMatch>
<Files ~ "(\.(includes|tmp))$">
Order deny,allow
Deny from all
</Files>
# Set Apache2 options
Options -Indexes
Options +FollowSymLinks
# Set custom 404 page
ErrorDocument 404 /404.php
# Set the default file
DirectoryIndex index.php
# Set PHP values
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value include_path '/www/bcf01.dev.threespot.com/includes'
php_flag display_errors on
php_value error_reporting 2047
php_value upload_max_filesize 1M
php_value post_max_size 2M
php_value memory_limit 3M
# Set rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond
%{REQUEST_URI} !^/index\.php$
RewriteCond
%{REQUEST_URI} !^/.*\.html$
RewriteCond
%{REQUEST_URI} !^/test\.php$
RewriteCond
%{REQUEST_URI} !(admin/|images/|includes/|scripts/|css/|flash/|tree/)
RewriteRule
^([^/\.]+)(/(.*))?$ /tree/$3 [L,QSA]
#
RewriteRule (.*) /index.php [L]
</IfModule>
----- Mensaje original ----
De: Eric Helvey <eric@alliances.org>
Para: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
CC: novalug@calypso.tux.org
Enviado: lunes, 26 de febrero, 2007 16:36:41
Asunto: Re: [Novalug] rewrite module
Apparently, you've got some error handling that is redirecting you to a
404.php page - which gets run through the engine...
Try adding this rule:
RewriteCond %{REQUEST_URI} !^[0-9]+\.php$
It might be a little too liberal, but will hopefully get you over this
hump.
Eric
On Mon, 2007-02-26 at 21:25 +0000, Miguel Gonzalez wrote:
> a Mobilize/index.php URL gets the following
>
> Many thanks :)
>
<snip>
>
> ----- Mensaje original ----
> De: Eric Helvey <eric@alliances.org>
> Para: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
> CC: novalug <novalug@calypso.tux.org>
> Enviado: lunes, 26 de febrero, 2007 16:09:19
> Asunto: Re: [Novalug] rewrite module
>
> Do the apache access logs show you the multiple tries that you're
> getting?
>
> Can you provide me with a sample URL that enters the loop and the apache
> access logs associated with that (and the subsequent) requests?
>
> As far as why... Could be a number of causes. Maybe the other rewrite
> engine was more forgiving of a poorly formed regular expression. Could
> be that some aspect of the previous configuration didn't make it through
> the conversion process...
>
> Eric
>
> On Mon, 2007-02-26 at 20:31 +0000, Miguel Gonzalez wrote:
> > I have substituted
> >
> > RewriteCond %{REQUEST_URI} !(admin/|images/|includes/|scripts/|css/|flash/|tree/)
> >
> > for the one you said and still does not work.
> >
> > It
> > used to work before We had to downgrade Apache 2.0.54 from a Debian
> > unstable Apache 2.2.x installation. No changes in the code, how come
> > mod_rewrite can be working and not now?
> >
> > Miguel
> >
> > ----- Mensaje original ----
> > De: Eric Helvey <eric@alliances.org>
> > Para: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
> > CC: novalug@calypso.tux.org
> > Enviado: lunes, 26 de febrero, 2007 15:12:30
> > Asunto: Re: [Novalug] rewrite module
> >
> > Try:
> >
> > RewriteCond
> > %{REQUEST_URI} !((admin/)|(images/)|(includes/)|(scripts/)|(css/)|(flash/)|(tree/))
> >
> > Eric
> >
> > On Mon, 2007-02-26 at 19:11 +0000, Miguel Gonzalez wrote:
> > > Dear all,
> > >
> > > I have Apache2 on a Debian stable. I have what seems to be a endless loop:
> > >
> > > mod_rewrite:
> > > maximum number of internal redirects reached. Assuming configuration
> > > error. Use 'RewriteOptions MaxRedirects' to increase the limit if
> > > neccessary.
> > >
> > > the rules are:
> > >
> > > IfModule mod_rewrite.c>
> > > RewriteEngine on
> > > RewriteCond %{REQUEST_URI} !^/index\.php$
> > > RewriteCond %{REQUEST_URI} !^/.*\.html$
> > > RewriteCond %{REQUEST_URI} !^/test\.php$
> > > RewriteCond %{REQUEST_URI} !(admin/|images/|includes/|scripts/|css/|flash/|tree/)
> > >
> > > RewriteRule ^([^/\.]+)(/(.*))?$ /tree/$3 [L,QSA]
> > > # RewriteRule (.*) /index.php [L]
> > > </IfModule>
> > >
> > > I have read that there are some issues in the rules definitions that could provoke an endless loop. But I am not an expert on writing these rules and these ones where written by someone else. Any thoughts?
> > >
> > > Regards,
> > >
> > > Miguel
> > >
> > >
> > >
> > >
> > > ______________________________________________
> > > LLama Gratis a cualquier PC del Mundo.
> > > Llamadas a fijos y móviles desde 1 céntimo por minuto.
> > > http://es.voice.yahoo.com
> > > _______________________________________________
> > > Novalug mailing list
> > > Novalug@calypso.tux.org
> > > http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug
> >
> >
> >
> >
> >
> >
> >
> > ______________________________________________
> > LLama Gratis a cualquier PC del Mundo.
> > Llamadas a fijos y móviles desde 1 céntimo por minuto.
> > http://es.voice.yahoo.com
>
>
>
>
>
>
>
> ______________________________________________
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
_______________________________________________
Novalug mailing list
Novalug@calypso.tux.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
More information about the Novalug
mailing list