its bean 2 days that im trying to solve that problem. I need to remove the index.php from the URL, my conf is good

它的豆子2天,我试图解决这个问题。我需要从URL中删除index.php,我的conf很好

$config['base_url'] = 'http://mywebsite/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

(I changed the uri_protocol and tryied all the suggested values)

(我更改了uri_protocol并尝试了所有建议的值)

The .htaccess file is good to,

.htaccess文件很好用,

I tried to many suggestions on the .htaccess and here is the last one :

我尝试了很多关于.htaccess的建议,这是最后一个:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

here is the disposition of the files :

这是文件的配置:

- bin
- etc
- mail
- public_ftp
- public_html
 -- application
 -- assets
 -- system
 -- .htaccess
 -- index.php

As you see, my application is on the public_html file, my server is using the cpanel accelerator 2 for the configuration, and i cant access the httpd.conf to see if the AllowOverride is setted to ALL.

如您所见,我的应用程序位于public_html文件中,我的服务器使用cpanel加速器2进行配置,我无法访问httpd.conf以查看AllowOverride是否设置为ALL。

How could i fix that problem ?

我怎么能解决这个问题?

1 个解决方案

#1


0

I have same problem. Can you show your virtualhost file please edit:added my topic subject CodeIgniter index.php URL rewriting OVH

我有同样的问题。你能否展示你的虚拟主机文件请编辑:添加我的主题主题CodeIgniter index.php URL重写OVH

2nd edit: Try to remove the first / on your .htaccess like this RewriteRule ^(.*)$ index.php/$1 [L]

第2次编辑:尝试删除你的.htaccess上的第一个/像这个RewriteRule ^(。*)$ index.php / $ 1 [L]

更多相关文章

  1. 用于上传多个文件的PHP代码
  2. php中如何获取文件的正确路径
  3. 入门: 如何在xampp中运行php文件 (WINDOWS)
  4. 自动同步vps服务器或本地文件的数据到百度网盘
  5. PHP文件操作 - 替换某行,插入某行,删除某行,获取行号
  6. php读取目录及子目录下所有文件名的方法
  7. 如何在XMLHttpRequest中获取实际文件?
  8. MySql数据库——文件
  9. mysql日志文件过大导致磁盘空间不够的问题

随机推荐

  1. Android 属性动画简介
  2. Android 创建android Splash界面以及避免
  3. android:theme="@android:style/Theme.Li
  4. Android View添加 Listener 小技巧示例
  5. Flutter 与 Android
  6. Android Jni示例
  7. Android studio 连接数据库小经历遇到的
  8. Android studio添加第三方类库时出现的版
  9. android编译错误,Android requires compil
  10. 安卓开发38:安卓的滚动条相关属性