thinkphp隐藏中url的index.php,thinkphpindex.php_PHP教程

WBOY
Libérer: 2016-07-13 10:10:44
original
1045 Les gens l'ont consulté

thinkphp隐藏中url的index.php,thinkphpindex.php

在本地进行测试

1.修改apache配置文件将如下代码#去掉
<span>#</span><span>LoadModule rewrite_module modules/mod_rewrite.so</span>
Copier après la connexion

在index.php 目录下新建文件.htaccess文件
<IfModule mod_rewrite.c><span>
RewriteEngine on
RewriteCond </span>%{REQUEST_FILENAME} !-<span>d
RewriteCond </span>%{REQUEST_FILENAME} !-<span>f
RewriteRule </span>^(.*)$ index.php/$1 [QSA,PT,<span>L]
</span></IfModule>
Copier après la connexion

在配置文件config.php修改URL模式
'URL_MODEL'=>2,
Copier après la connexion

 

  在万网UNIX虚拟主机,开放了PHP-Rewrite功能官网提供了一个测试的小程序http://help.www.net.cn/knowledge_detail.htm?spm=5334.7618386.5.1.0T8ePV&knowledgeId=5868355&keyWords=unix%E8%99%9A%E6%8B%9F%E4%B8%BB%E6%9C%BAphp-rewrite%E6%B5%8B%E8%AF%95%E7%A8%8B%E5%BA%8F&categoryId=8311139 万网虚拟主机设置方法与在本地设置相同              

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/933468.htmlTechArticlethinkphp隐藏中url的index.php,thinkphpindex.php 在本地进行测试 1.修改apache配置文件将如下代码#去掉 # LoadModule rewrite_module modules/mod_rewrite.so 在in...
Étiquettes associées:
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!