更改URL index.php

时间:2015-02-18 06:38:33

标签: php codeigniter codeigniter-3

在git hub的codeigniter 3中,我尝试使用enable_query_strings,但没有按照我的意思行事。

我使用index.php但也希望添加index.php?route=,以便网址看起来像http://www.example.com/index.php?route=folder/controller/

但是当我将它添加到我的配置时,index_page路由不起作用$config['index_page'] = 'index.php?route=';

不适用于

Options +FollowSymlinks
Options -Indexes

<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 Order deny,allow
 Deny from all
</FilesMatch>

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

我可以让$config['index_page'] = 'index.php?route=';使用我的网址吗?

0 个答案:

没有答案
相关问题