我已经开始使用代码点火器,并希望在本地主机中删除URL /testing_palace/index.php/home到/testing_palace/home中的/testing_palace/home。
我在谷歌上搜索了这个问题,并尝试了建议的解决方案,但没有对我有效。
我将配置中的base_url和索引页更改为
$config['base_url']= 'http://localhost/testing_palace/';
$config['index_page'] ="";并启用windows上的选中mod_rewrite。
这是我的.htaccess代码
RewriteEngine On
RewriteBase /testing_palace
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]所有这些解决方案都不管用,因为我找不到错误。

发布于 2014-10-28 06:28:51
让你的/testing_palace/.htaccess像这样:
RewriteEngine on
RewriteBase /testing_palace/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]然后,在/testing_palace/application/config/config.php中,您需要具有以下配置设置:
$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';发布于 2014-10-28 06:12:16
使用以下.htaccess。
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]我想这会对你有帮助的。
https://stackoverflow.com/questions/26601845
复制相似问题