zoukankan      html  css  js  c++  java
  • thinkphp如何隐藏入口文件index.php

    1.说明(为什么需要隐藏index.php)

    • 在使用tp5框架的时候最烦人的就是那个入口文件index.php

    • 你使用方法的时候如果不在url中添加index.php项目就会无法运行很是烦人

    • 关键是不美观

    2.首先找到你的项目中的public.htaccess打开然后找到下面有index.php的这一行

    在后面添加一个?号 

    <IfModule mod_rewrite.c>
    
    
    Options +FollowSymlinks -Multiviews
     
    
    RewriteEngine On
    
     
    
    RewriteCond %{REQUEST_FILENAME} !-d
      
    
    RewriteCond %{REQUEST_FILENAME} !-f
     
    
    RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
    
    
    </IfModule>

    3.之后你就可以正常的使用你的项目了

  • 相关阅读:
    HttpClient
    充值保存
    button 样式
    创建窗口
    第十一次作业
    第十次作业
    第九次作业
    第八次作业
    第七次作业
    第六次作业
  • 原文地址:https://www.cnblogs.com/yaoliuyang/p/12410193.html
Copyright © 2011-2022 走看看