1

我在centos中部署了httpd(2.4)+php5.6(FastCGI模式)+mysql playform。

我安装了thinkphp,但是pathinfo有一些错误。

我的配置如下:

1.httpd.conf中的配置:

LoadModule rewrite_module modules/mod_rewrite.so remove comment

2.httpd-vhost.conf中的配置:

<VirtualHost *:80>
DocumentRoot "/var/www"
ServerName 192.168.79.130
ProxyRequests Off
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/$1
<Directory "/var/www">
    Options none
    AllowOverride All
    Require all granted
</Directory>

3.web目录下的配置:

 <IfModule mod_rewrite.c>


      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]

</IfModule>

4.config.php中的配置:

'URL_MODEL'=>2

5.在地址栏中重新启动apache“ http://localhost/index.php/Index/test ”,

您无权访问此服务器上的 /index.php/Index/test。

在地址栏中输入“ http://localhost/index.php?s=Index/test ”后会正常显示。

那么如何在输入“ http://localhost/index.php/Index/test ”后使其正常显示

4

0 回答 0