的.htaccess和codeigniter不工作

问题描述:

我使用的雪豹,我有我的本地市场环境,我试图摆脱在URL中的index.php的......这里是我

I am using snow leopard and I have my local environment and I am trying to get rid of the index.php in the url...here is what i have

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

我的配置文件有这个

My config file has this

$config['index_page'] = "";

但是,当我访问的页面不的index.php它不工作

But when i visit the page without index.php it doesnt work

本作品

http://localhost/ci_example/index.php/site

这并不

http://localhost/ci_example/site

我试图按照this

也许我需要做的事情与本地的conf文件...但我真的不知道,我不知道如何重新启动Apache的命令行...任何想法

maybe i need to do something with my local conf file...but i really dont know what and i have no idea how to restart apache command line...any ideas

是什么意思时,你说:这是行不通的你是什么意思?你得到一个错误?白色的屏幕? 500错误?

What do you mean when you say "it doesn't work"? Do you get an error? A white screen? A 500 error?

你确定你的httpd.conf文件的的AllowOverride 设置设置为所有?如果不是,它可能不使用.htaccess文件,这意味着该重写规则将不被使用。

Did you make sure your httpd.conf file has the AllowOverride setting set to All? If not, it may not be using your .htaccess file, meaning the rewrite rules won't be used.