views:

81

answers:

2

I am not sure who the culprit is, but here's the apache error log using LogLevel Debug:

[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico/favicon.ico/favicon.ico/favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico/favicon.ico/favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico/favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /favicon.ico
[Tue Jul 13 11:51:18 2010] [debug] mod_deflate.c(615): [client 68.178.109.243] Zlib: Compressed 624 to 387 : URL /index.php/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico

favicon.ico keeps getting redirected and after 10 it errors out. This is a rewrite rule that, as far as I know, is working on the dev remote server but seems to be crashing on my local setup. Any idea where I can go to start debugging this?

Edit: Here's the rewrite rule for favicon:

RewriteRule ^(.+/)favicon\.ico$ favicon.ico

So what this is stating is any string that preceding favicon.ico should be redirected to favicon.ico, is that correct? Admittedly the regex-ness of it throws me off.

A: 

.htaccess i guess. redirecting a favicon in php code would be crazy imo.

edit:

just tested this .htacces and it works perfectly (ko3)

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

# Protect hidden files from being viewed
<Files .*>
    Order Deny,Allow
    Deny From All
</Files>
RewriteRule ^(.+/)favicon.ico$ favicon.ico

# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b - [F,L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
antpaw
rewrite rule has been posted
tipu
ok posted .htaccess
antpaw
A: 

Find the .htaccess file that contains the rewrite rules. It seems to be triggering a recursive rewrite.

EDIT:

Try changing your rule to this:

RewriteRule ^(.+/)favicon\.ico$ favicon.ico [L]

That should halt the recursive rewrite.

Kalium
rewrite rule has been posted
tipu
Try that, see if it works.
Kalium
it still does it multiple times, but instead of going favicon.ico/favicon.ico/favicon.ico/ and so on, it stays at /favicon.ico, thanks.the reason it does it multiple times is prob an error in my code
tipu
My rewrite-fu isn't good enough to deduce why you're getting multiple requests, but the [L] stops a recursive request.
Kalium