Apache+PHP+Yii2 .htaccess配置,以及启动Xdebug

在网站根目录中配置.htaccess,Apache可以从其中读取URL重写规则。以下为常用配置:

RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php?XDEBUG_SESSION_START=

最后一行增加?XDEBUG_SESSION_START=,目的是在所有的URL后追加XDEBUG_SESSION_START参数,这样php就会连接xdebug server(比如PHPStorm)。

猜你喜欢

转载自blog.csdn.net/quqtalk/article/details/81748147