]> git.wh0rd.org - tt-rss.git/blobdiff - login.php
option to redirect to https url for login, option ENABLE_LOGIN_SSL (fixes some non...
[tt-rss.git] / login.php
index b162fa9cdbd294342514f34a6221f91cc7f1ec5e..eda2ac826a53324f32d9e5c84e70e83c9896f226 100644 (file)
--- a/login.php
+++ b/login.php
@@ -6,8 +6,11 @@
        require_once "config.php";
        require_once "functions.php";
 
+       $url_path = get_script_urlpath();
+       $redirect_base = "http://" . $_SERVER["SERVER_NAME"] . $url_path;
+
        if (SINGLE_USER_MODE) {
-               header("Location: tt-rss.php");
+               header("Location: $redirect_base/tt-rss.php");
                exit;
        }
 
@@ -25,7 +28,7 @@
                        } else {
                                $redirect_to = "tt-rss.php";
                        }
-                       header("Location: $redirect_to");
+                       header("Location: $redirect_base/$redirect_to");
                }
        }