httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50546] New: Mix of mod_alias and mod_rewrite: endless loop
Date Wed, 05 Jan 2011 21:00:30 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50546

           Summary: Mix of mod_alias and mod_rewrite: endless loop
           Product: Apache httpd-2
           Version: 2.2.17
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: david@mailinator.com


My folder structure:

    - nameoftherootfolder
    -- app
    -- public
    --- .htaccess
    --- index.php

Now I have the problem that in some cases my apache rewrites too often internal
that I get an 500 server error, here the log:

    [Wed Jan 05 17:51:54 2011] [error] [client 127.0.0.1] Request exceeded the
limit of 3 internal redirects due to probable configuration error. Use
'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel
debug' to get a backtrace.
    [Wed Jan 05 17:51:54 2011] [debug] core.c(3046): [client 127.0.0.1] r->uri
= /nameoftherootfolder/public/index.php
    [Wed Jan 05 17:51:54 2011] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /nameoftherootfolder/public/index.php
    [Wed Jan 05 17:51:54 2011] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /nameoftherootfolder/public/index.php
    [Wed Jan 05 17:51:54 2011] [debug] core.c(3052): [client 127.0.0.1]
redirected from r->uri = /nameoftherootfolder/nothere/

My .htaccess:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

I tried also this .htaccess:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteCond %{REQUEST_FILENAME} !-l 
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/index\.php$
    RewriteRule ^.*$ index.php [NC,L]


The index.php handles all requests and handle also if the accessed url is
wrong, e.g. not exists.

It works if the accessed url exists but it the url is "wrong" I get that error.
I get this just since I set an Apache alias:

    Alias /nameoftherootfolder/
"C:/somepathshere/WAMP/www/nameoftherootfolder/public/" 

    <Directory "C:/somepathshere/WAMP/www/nameoftherootfolder/public/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
            Order allow,deny
        Allow from all
    </Directory>

There are now internal redirects with Apache till it returns the 500 error.
I'm using Apache 2.2.17.

Note:
If I put a `index.php/` inside the uri it works, but that is SEO unfriendly,
user unfriendly and looks horrible, e.g. request.
`http://localhost/nameoftherootfolder/index.php/nothere/` or
`http://localhost/nameoftherootfolder/index.php/index/`

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message