【发布时间】:2010-04-14 22:57:12
【问题描述】:
我有一个使用 CodeIgniter 的工作网页。我现在只是将它上传到我的网络服务器,它给了我一个 404 错误。
浏览器地址为“web-page.com/folder/en/about”
配置中的baseurl是“web-page/folder/”
这也在 config.php 中,我确实尝试了 AUTO,但它也不起作用。
$config['index_page'] = "";
$config['uri_protocol'] = "QUERY_STRING";
index.php 位于“web-page.com/folder/”中
我的 htaccess 在“web-page.com/folder/.htaccess”中
.htaccess 的内容是
AddCharset utf-8 .css .html .xhtml
Options +FollowSymlinks
RewriteEngine on
RewriteBase /folder/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|images|media|layout|css|libs|robots\.txt)
RewriteRule ^(.*)$ /folder/index.php?/$1 [L]
您有什么建议,有什么想法吗,我可以尝试做什么?我确实检查了所有权利,即使使用 777 也不起作用。
提前致谢。
卢卡斯
【问题讨论】:
-
检查 mod_rewrite 是否在您的服务器上。我前段时间遇到过这样的问题,结果发现 mod_rewrite 不存在。
-
嘿,谢谢你的想法,但是 mod_rewrite 在我的服务器上肯定是激活的。我确实尝试了不同的服务器,但它也无法在那里工作。
标签: .htaccess mod-rewrite codeigniter http-status-code-404 codeigniter-url