Codeigniter没有在config中更改index.php,并且.htaccess不工作
我的子域codeigniter有这个问题,我想去掉index.php,但由于某些原因无法工作 我已将.htaccess设置为以下内容:Codeigniter没有在config中更改index.php,并且.htaccess不工作,php,.htaccess,codeigniter,Php,.htaccess,Codeigniter,我的子域codeigniter有这个问题,我想去掉index.php,但由于某些原因无法工作 我已将.htaccess设置为以下内容: RewriteEngine on RewriteCond $1 !^(index\.php|images|captcha|css|js|user_guide|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] 此外,config.php index_页面设置已更改如下: $config['index_page']
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|user_guide|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
此外,config.php index_页面设置已更改如下:
$config['index_page'] = '';
你知道它为什么不工作吗?这是我的当前设置方式,希望能有所帮助
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
这是我的
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]
您的
Apache
中是否启用了mod_rewrite
模块?检查您的httpd.conf
文件中是否有LoadModule rewrite\u module modules/mod\u rewrite.so
未注释。