现在,网址为我的网站是例如:http://localhost/xxx/index.php/welcome/mod_rewrite的笨
我想这个更改为:http://localhost/xxx/welcome/
我的.htaccess文件:
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
我的config.php文件:
$config['base_url'] = 'http://localhost/xxx/';
$config['index_page'] = '';
但我的新网址仍然无效。我应该在那里添加什么?
这个问题可能有助于消除http://stackoverflow.com/questions/30933255/codeigniter-removing-index-php-from-url的index.php一直问数百次堆栈过流。不要触摸应用程序文件夹中的htaccess。 – user4419336
实际上是否有效?你为什么拒绝访问该网站? “要求全部拒绝” –