apache去掉index.php

2,434次阅读

共计 275 个字符,预计需要花费 1 分钟才能阅读完成。

配置.htaccess 文件加入以下配置:

RewriteEngine on
RewriteBase /
# Hide the application and system directories by redirecting the request to index.php
RewriteRule ^(application|system|\.svn) index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

正文完
 
Blood.Cold
版权声明:本站原创文章,由 Blood.Cold 2019-06-03发表,共计275字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。