fix url detection
authorStricted <info@stricted.net>
Wed, 20 Jul 2016 07:29:08 +0000 (09:29 +0200)
committerStricted <info@stricted.net>
Wed, 20 Jul 2016 07:29:08 +0000 (09:29 +0200)
lib/system/RequestHandler.class.php
templates/default/login.tpl

index 54f076b7feff74dd922c3b8137585790d69ffe46..98e3fa2e6b3469a3c32cccf30792a3d544e1e935 100644 (file)
@@ -150,7 +150,7 @@ class RequestHandler extends SingletonFactory {
                        $protocol = 'https://';
                }
                
-               return $protocol . $_SERVER['HTTP_HOST'] . '/';
+               return $protocol . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/';
        }
        
        public function getLink (array $params = [], $query = '') {
index c735610f049f5a752ec2ea8d41a7fdf6945a6bcc..5b035e8d7a01d416a035e3c3ffa4cb8d3e484eeb 100644 (file)
@@ -25,7 +25,7 @@
                                                        <h3 class="panel-title">Please Sign In</h3>
                                                </div>
                                                <div class="panel-body">
-                                                       <form method="post" action="index.php?login">
+                                                       <form method="post" action="{link controller='Login'}{/link}">
                                                                <fieldset>
                                                                        <div class="form-group">
                                                                                <input class="form-control" placeholder="Username" name="username" type="username" autofocus>