zoukankan      html  css  js  c++  java
  • ThinkPHP5配置隐藏入口index.php文件,Apache/phpstudy

    一,找到/public/.htaccess文件,如果你的入口文件已经移动到根目录下,那么你的.htaccess文件也要剪切到根目录下,总之要确保.htaccess跟入口的index.php保持同级。

    二,根据你的php环境分别设置.htaccess文件:

    Apache:

    <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>

    phpstudy:

    <IfModule mod_rewrite.c> 
    Options +FollowSymlinks -Multiviews 
    RewriteEngine on 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1] 
    </IfModule>

  • 相关阅读:
    DRF
    DRF
    DRF
    DRF
    RESTful介绍
    DRF parser请求处理流程
    Vue项目的创建
    怎么清除file控件的文件路径
    java用spring实现文件下载
    JS判断元素是否在数组内 阿星小栈
  • 原文地址:https://www.cnblogs.com/super-zhangkun/p/11733876.html
Copyright © 2011-2022 走看看