httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matt farey <matt.fa...@gmail.com>
Subject Re: [users@httpd] rewrite rules
Date Mon, 26 Feb 2007 21:19:30 GMT


Gonzalez, Miguel wrote:
> Do you see any failure on the rules? I have sent out the logs that I got, it seems that
It gets on an endless loop.
>
> Many thanks
>
> Miguel
>
>   
>> -----Original Message-----
>> From: matt farey [mailto:matt.farey@gmail.com]
>> Sent: Monday, February 26, 2007 3:18 PM
>> To: users@httpd.apache.org
>> Subject: Re: [users@httpd] rewrite rules
>>
>> What URL you are actually requesting? - there are a few that will, but
>> that's ok provided you don't care about those.
>>
>> Gonzalez, Miguel wrote:
>>     
>>> Dear all,
>>>
>>>   I have Apache 2.0.54 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
>>>
>>> Miguel Gonzalez
>>> Threespot | 3333 14th street NW | Suite 300 | Washington, DC 20010
>>> T: | F: 202.518.0425 | E: miguel.gonzalez@threespot.com
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>>
>>>
>>>       
>> --
>> Matthew Farey
>> Web App Sec.
>> 25 The Polygon, Southampton, Hants, SO15 2BP, UK
>> Phone +44(0)2380 631449
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>     
>
>   
does it do what you want if you use this:
<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_URI} !^/?(index\.php|.*\.html|test\.php)$
 RewriteCond %{REQUEST_URI}
!(admin|images|includes|scripts|css|flash|tree)/?
 RewriteRule ^([^/\.]+)(/(.*))?$ /tree/$3 [L,QSA]
#RewriteRule (.*) /index.php [L]
</IfModule>


-- 
Matthew Farey



---------------------------------------------------------------------
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


Mime
View raw message