【发布时间】:2018-07-07 12:44:02
【问题描述】:
我有一个使用 MAMP 在我的本地计算机上运行的应用程序,但无法重定向到实时服务器上的某个页面。我已将其缩小到 .htaccess 文件,但似乎无法获得确切的配置。当我在基于 Codeigniter 的应用程序上注册用户并且它应该重定向到另一个页面时会发生这种情况,但没有。
这是我目前拥有的,
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://website.com/$1 [R,L]
# Hide all PHP files so none can be accessed by HTTP
RewriteRule (.*)\.php$ index.php?/$1
# If the file/dir is NOT real go to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
【问题讨论】:
标签: .htaccess codeigniter mamp