【发布时间】:2012-03-26 01:32:26
【问题描述】:
我已经尝试了很多答案,但总是遇到好的 ol,404 恐怖墙。我在使用 xamp 堆栈的 Windows 7 上。 mod_rewrite 已启用。
我把htaccess文件放在了主“codeigniter”目录下,即有application、system和user_guide的目录。我应该把它放在应用程序目录下吗?有views/model/config/etc.的那个?
这是我当前的 .htaccess 文件:
RewriteEngine On
# Put your installation directory here:
# If your URL is www.example.com/, use /
# If your URL is www.example.com/site_folder/, use /site_folder/
RewriteBase /website/codeigniter/
# Do not enable rewriting for files or directories that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# For reuests that are not actual files or directories,
# Rewrite to index.php/URL
RewriteRule .* index.php/$0 [PT]
访问http://localhost/website/codeigniter/index.php/welcome 有效 访问http://localhost/website/codeigniter/welcome 不会
我的 config.php 有
$config['base_url'] = 'http://localhost/website/codeigniter/';
$config['index_page'] = '';
非常感谢任何帮助!
错误是:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
Error 404
更新 哦,刚想查看apache日志,得到这个错误:
[Thu Mar 08 18:28:25 2012] [error] [client ::1] File does not exist: C:/xampp/htdocs/website/codeigniter/welcome
所以它似乎没有选择正确的 codeigniter 重定向?不确定?
【问题讨论】:
标签: php .htaccess codeigniter xampp