【发布时间】:2015-06-19 15:25:53
【问题描述】:
现在我网站的 URL 是:http://localhost/xxx/index.php/welcome/
我想把它改成: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'] = '';
但我的新网址仍然无法使用。我应该在那里添加什么?
【问题讨论】:
-
这个问题可能会帮助stackoverflow.com/questions/30933255/… 删除 index.php 已经在堆栈溢出中被问了数百次。不要触摸应用程序文件夹中的 htaccess。
-
真的有用吗?你为什么拒绝访问该网站?
Require all denied
标签: .htaccess codeigniter mod-rewrite