ci的url去除index.php
Posted maoriaty
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ci的url去除index.php相关的知识,希望对你有一定的参考价值。
wamp: httpd-vhost.conf
<VirtualHost *:80> ServerName localhost ServerAlias localhost #DocumentRoot "${INSTALL_DIR}/www" #<Directory "${INSTALL_DIR}/www/"> DocumentRoot "C:\JabinDoc\php_www" <Directory "C:\JabinDoc\php_www"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost> <VirtualHost *:80> ServerName php.test.com ServerAlias php.test.com DocumentRoot "C:\JabinDoc\php_www\ci" <Directory "C:\JabinDoc\php_www\ci"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost>
ci: 根目录下.htaccess
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L]
以上是关于ci的url去除index.php的主要内容,如果未能解决你的问题,请参考以下文章
无法从 CodeIgniter URL 中删除 index.php