我有一个使用 Code Igniter 2.0 编码的网站设计原型(prototype),但我无法访问内部页面。
这是网站原型(prototype)的链接:http://thepbe.org/
当我尝试访问内部页面时,浏览器只显示“未指定输入文件”。
我认为我的 .htaccess 文件有问题。
这是我的 .htaccess 文件中的代码:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ index.php/$1
最佳答案
打开 application/config/config.php
文件并确保设置了这些选项。
$config['index_page'] = “”;
$config['uri_protocol'] = “AUTO“;
然后将您的 .htaccess 文件更改为:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]
关于codeigniter - 无法访问 CodeIgniter 编码网站的内部页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8721675/