chamilo/chamilo-lms — pull request #81 by diegoe (2013-06-23 00:53:54+00:00)
Title: web: Fix infinite redirect from web/.htaccess

This bug was exposed in OSX with MAMP. The rewrite logic was causing an
infinite redirect to web/.

The exposed problem was this:

Supposing Chamilo to be installed in http://localhost/chamilo/, and
/chamilo/.htaccess to have a correct RewriteBase /chamilo/.

This was happening:
-> /index.php calls header("Location: web/index");
-> /web/.htaccess rewrites /web/index as index.php
-> index.php is interpreted as /chamilo/index.php
-> index.php redirects to web/index again...

The fix is to make sure that web/.htaccess redirects to web/index.php,
the "web/" prefix is meaningful.