我的项目(笨)在Windows 7上运行如何允许codeigniter查看我的.htaccess?
现在我的URL看起来像:
http://dev.something.com/index.php/reports
,我想:
http://dev.something.com/reports
我试图隐藏我的网址index.php
以可以访问控制器。
从这个link我把.htaccess
所以我的.htaccess的样子:
Options +FollowSymLinks
RewriteEngine on
RewriteCond $1 !^(index\.php|app|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
但这种改变并没有帮助我。
重要:
我清除所有数据从的.htaccess,但什么都没有发生。听起来像笨看不出.htaccess
.htaccess
下我的根项目AE住宿:
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\someprog_dev\.htaccess
[编辑1]
同一项目工作正常的Linux所以它不是笨配置问题
[编辑2]
我改变.htaccess
,以确保CodeIgniter使用.htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /blogna/index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
什么也没有发生。与index.php
一起使用,但不是没有。
[编辑3]
我httpd.conf
样子:
....
LoadModule rewrite_module modules/mod_rewrite.so
...
LoadModule php5_module "c:/php/php5apache2_2.dll"
<IfModule php5_module>
AddType application/x-httpd-php .php
PHPIniDir c:/php/
DirectoryIndex index.php index.html
</IfModule>
我错过了什么?任何建议
您是否启用了重写模块? –
@balajimca重写模块的Apache? – snaggs
是http://stackoverflow.com/a/3131259/817365 –