After adding `phpmyadmin` cartridge, the homepage URL will be appended incorrectly

Issue #200 resolved
Jimmy Chu created an issue

For example, with WordPress installation, it will first append phpmyadmin, and then append wp-admin/..., so the result will be /phpmyadminwp-admin/install.php

Comments (9)

  1. LiAh Sheep

    Minimal test case

    foo1.php: <?php header('Location: bar.php'); ?>
    foo2.php: <?php header('Location: /bar.php'); ?>
    foo3.php: <?php header('Location: http://php01-liahsheep.app.cnpaas.localhost/bar.php'); ?>

    When I go to foo1.php or foo2.php, it will redirect to:
    http://php01-liahsheep.app.cnpaas.localhost/bar.php (SUCCESS).

    However, when I go to foo3.php, it will redirect to:
    http://php01-liahsheep.app.cnpaas.localhost/phpmyadminbar.php (FAIL).

    CURL tells me that the Nginx(?) server is somehow doing the redirection for me:

    $ curl -v http://php01-liahsheep.app.cnpaas.localhost/foo3.php
    * Hostname was NOT found in DNS cache
    *   Trying 192.168.33.10...
    * Connected to php01-liahsheep.app.cnpaas.localhost (192.168.33.10) port 80 (#0)
    > GET /foo3.php HTTP/1.1
    > User-Agent: curl/7.37.1
    > Host: php01-liahsheep.app.cnpaas.localhost
    > Accept: */*
    > 
    < HTTP/1.1 302 Found
    < Date: Tue, 23 Jun 2015 09:20:02 GMT
    * Server Apache/2.2.15 (CentOS) is not blacklisted
    < Server: Apache/2.2.15 (CentOS)
    < Location: http://php01-liahsheep.app.cnpaas.localhost/phpmyadminbar.php ### <= Note this line
    < Content-Length: 0
    < Content-Type: text/html; charset=UTF-8
    < Connection: close
    < 
    * Closing connection 0
    
  2. Log in to comment