爱玺玺

爱玺玺的生活日记本。wx:lb87626

apache thinkphp5.1隐藏index.php 不能用官网的

下面打开页面不会错误,但是提交表单却出了问题


不能完全用官网的,服务器配置不一样 


apache测试下面可用,打开提交表单都可用


正确的.haccess

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


宝塔的伪静态配置就是配置的.haccess文件,可以直接复制粘贴,apache需开启伪静态



发表评论:

Powered By Z-BlogPHP 1.4 Deeplue Build 150101

Copyright Your WebSite.Some Rights Reserved.

蜀ICP备11021721号-5