Rewrite root address to a subdirectory in nginx

后端 未结 7 809
攒了一身酷
攒了一身酷 2020-12-29 19:55

I\'m converting my mediawiki site to use nginx as a frontend for static files with apache on the backend for php. I\'ve gotten everything working so far except for when I vi

7条回答
  •  心在旅途
    2020-12-29 20:20

    The answer you used is a redirect, making you skip the / location to a /wiki location, You can try this instead

    location = / {
        rewrite ^ /w/index.php?title=Main_Page&$args last;
    }
    

    This should server the Main_Page for the / URI

提交回复
热议问题