<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    # 打开Rerite功能
    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # 如果访问的文件或目录不是真事存在,分发请求至 index.php,如果请求的是真实存在的文件或目录,直接访问
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^ index.php [L]
</IfModule>
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-09-17
  • 2021-07-03
  • 2022-01-24
  • 2021-09-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2022-01-25
  • 2021-08-15
相关资源
相似解决方案