【发布时间】:2015-03-11 14:27:55
【问题描述】:
我有一个问题,我使用一个 .htaccess 文件形成一年,此代码可在所有服务器上运行,但今天我有一个新服务器,相同的代码无法运行。我无法从 URL 中删除 index.php。我的服务器是 Apache/2.2.15 (Red Hat)。 我的 .htaccess 文件代码
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
<IfModule mod_headers.c>
Header add Cache-Control: "no-store, no-cache, must-revalidate"
</IfModule>
在配置文件中我设置了下面的设置
$config['index_page'] = ''; $config['uri_protocol'] = 'AUTO';
同样的代码正在另一台服务器上运行
【问题讨论】:
标签: codeigniter