$config['base_url'] = 'http://mywebsite/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
(我更改了uri_protocol并尝试了所有建议的值)
.htaccess文件很适合,
我尝试了很多关于.htaccess的建议,这是最后一个:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
这里是文件的配置:
- bin
- etc
- mail
- public_ftp
- public_html
-- application
-- assets
-- system
-- .htaccess
-- index.php
如您所见,我的应用程序位于public_html
文件上,我的服务器正在使用cpanel accelerator 2进行配置,我无法访问httpd.conf以查看AllowOverride
是否已设置到ALL
。
我怎么能解决这个问题?
答案 0 :(得分:0)
我有同样的问题。你能否展示一下你的虚拟主机文件? 编辑:添加了我的主题主题CodeIgniter index.php URL rewriting OVH
第二次编辑: 尝试删除你的.htaccess上的第一个/像这个RewriteRule ^(。*)$ index.php / $ 1 [L]