在phpstudy集成環境下的nginx服務器下配置url重寫


直接在對應的vhosts.conf配置文件的location / {}中添加以下內容:

location / {
           index  index.html index.htm index.php;
    #autoindex  on;
    if (!-e $request_filename) {
        rewrite ^(.*)$ /index.php?s=/$1 last;
        break;
    }

具體操作過程如下:

1、找到對應的vhosts.conf配置文件

2、選擇所需要配置重寫url的站點

搞定!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM