Home > php教程 > php手册 > 在htaccess文件中隐藏index.php

在htaccess文件中隐藏index.php

WBOY
Release: 2016-06-07 11:45:51
Original
1494 people have browsed it

仅适用于Apache下面,如果你的Apache已经开启rewrite模块的话(大部分环境都已经开启),可以在.htaccess文件中添加下面代码:<ifmodule><br> RewriteEngine on<br> RewriteCond %{REQUEST_FILENAME} !-d<br> RewriteCond %{REQUEST_FILENAME} !-f<br> RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]<br> </ifmodule>即可实现,把 http://thinkphp.cn/index.php/down地址中的index.php隐藏,利用SEO。

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template