【问题标题】:Fat-Free Framework redirects to invalid urlFat-Free Framework 重定向到无效的 url
【发布时间】:2017-03-17 08:15:40
【问题描述】:

我目前正在为一个项目使用 Fat-Free Framework。但是每当我浏览到 http://localhost/fatfree/admin/login/ 时,F3 将重定向到最后没有斜杠(“/”)的 url。我知道这很正常,但我被重定向到的 url 无效。 F3 将我重定向到 http://localhosthttp//localhost/fatfree//admin/index(确切网址)

我在 Windows 7 64 位上运行 PHP 7.1.0 + Apache 2.4

配置/config.ini.php:

[globals]
DEBUG=3
UI=Views/
BASE=http://localhost/fatfree/
SITENAME="my website"

[configs]
Config/database.ini.php=false
Config/routes.ini.php=false

配置/routes.ini.php:

;<?php die; ?>

[routes]

; main section
GET /=Controllers\Main->index
GET /products=Controllers\Products

; customer section

; admin section
GET /admin=Controllers\Admin->index
GET /admin/index=Controllers\Admin->index
GET /admin/login=Controllers\Admin->login

如何确保 F3 重定向到正确的 url?

我必须设置框架变量吗?

【问题讨论】:

    标签: php redirect fat-free-framework


    【解决方案1】:

    无需在配置中设置BASE。 F3 会自行找到。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-02
      相关资源
      最近更新 更多