Rewrite all requests to index.php with nginx

后端 未结 8 2233
陌清茗
陌清茗 2020-11-28 05:17

In my apache configuration I have the following simple rewrite rule which

  1. unless file exists will rewrite to index.php
  2. on the urls you never see the f
8条回答
  •  执笔经年
    2020-11-28 05:34

    Flat and simple config without rewrite, can work in some cases:

    location / {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME /home/webuser/site/index.php;
    }
    

提交回复
热议问题