Rewrite 重写配置

xiaoxiao2021-02-28  112

ps:在网站建设的过程中会出现服务器未开启rewrite配置,最近只用nginx配置thinkphp了,所以先只写一个吧

nginx 基于 thinkphp 的 rewrite 配置

location / { root /var/www; index index.html index.htm index.php; if (!-e $request_filename) { rewrite ^/index.php(.*)$ /index.php?s=$1 last; rewrite ^(.*)$ /index.php?s=$1 last; break; } }
转载请注明原文地址: https://www.6miu.com/read-28913.html

最新回复(0)