使用phpstudy和linux部署的时候 
tp5中的官方说明是在入口文件的同级目录下添加一个.htaccess文件 
文件内容如下:

<IfModule mod_rewrite.c>Options +FollowSymlinks -MultiviewsRewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]</IfModule>
  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

这个配置在phpstudy和linux下并没有效果 
如果是在phpstudy和linux下面.htaccess文件里面的内容应该改成:

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

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

           

相关文章:

  • 2022-12-23
  • 2021-12-16
  • 2021-11-25
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2021-10-23
  • 2021-10-30
猜你喜欢
  • 2022-12-23
  • 2022-01-06
  • 2022-01-21
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案