我一直在使用 codeigniter CMS。它工作正常......直到4天。我确实玩了一下 httpd.conf,但它启用了 .htaccess,所以我确信这可能不是问题。每当我单击 CMS 主页上的任何页面时,它都会重定向到 base_url。CMS 的登录页面看起来很好,也可以登录到主页。主页中的 url 重定向到基本 URL。
我检查了这个问题
通过将 $config['uri_protocol'] = "AUTO" 更改为提到的选项来尝试此解决方案。但这似乎不是解决方案。我的 .htaccess 文件读取
DirectoryIndex index.php
<IfModule mod_rewrite.c>
#http://codeigniter.com/wiki/mod_rewrite
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
尝试通过更改 base_url 和 all 来使用 config.php 。但它似乎不起作用。任何想法/帮助?