{"id":150440,"date":"2020-09-02T22:37:53","date_gmt":"2020-09-02T14:37:53","guid":{"rendered":"http:\/\/4563.org\/?p=150440"},"modified":"2020-09-02T22:37:53","modified_gmt":"2020-09-02T14:37:53","slug":"nginx-%e6%80%8e%e4%b9%88%e9%85%8d%e7%bd%ae%e8%ae%bf%e9%97%ae%e7%9a%84-url-%e6%98%af%e7%9b%ae%e5%bd%95%e7%9a%84%e6%97%b6%e5%80%99%e8%b7%b3%e8%bd%ac%e5%88%b0%e7%9b%ae%e5%bd%95%e4%b8%8b%e7%9a%84-index-p","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=150440","title":{"rendered":"Nginx \u600e\u4e48\u914d\u7f6e\u8bbf\u95ee\u7684 URL \u662f\u76ee\u5f55\u7684\u65f6\u5019\u8df3\u8f6c\u5230\u76ee\u5f55\u4e0b\u7684 index. PHP \u5e76\u4fdd\u7559\u67e5\u8be2\u53c2\u6570"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Nginx \u600e\u4e48\u914d\u7f6e\u8bbf\u95ee\u7684 URL \u662f\u76ee\u5f55\u7684\u65f6\u5019\u8df3\u8f6c\u5230\u76ee\u5f55\u4e0b\u7684 index. PHP \u5e76\u4fdd\u7559\u67e5\u8be2\u53c2\u6570               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : harrisliang <\/span>  <span><i><\/i> 26<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u60f3\u914d\u7f6e Nginx \u5b9e\u73b0\u5f53\u8bbf\u95ee\u7684 URL \u662f\u76ee\u5f55\u7684\u65f6\u5019\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code>http:\/\/127.0.0.1\/modules\/sso?param=abcd <\/code><\/pre>\n<p>\u6b64\u5904\u5bf9\u5e94\u7684<code>modules\/sso<\/code>\u76ee\u5f55\u662f\u771f\u5b9e\u5b58\u5728\u7684\uff0c\u90a3\u4e48\u8bf7\u6c42 URL \u53d8\u4e3a\uff1a<\/p>\n<pre><code>http:\/\/127.0.0.1\/modules\/sso\/index.php?param=abcd <\/code><\/pre>\n<p>\u7279\u522b\u7684\uff0c\u5982\u679c URL \u540e\u9762\u5305\u542b\u659c\u7ebf\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code>http:\/\/127.0.0.1\/modules\/sso\/?param=abcd <\/code><\/pre>\n<p>\u4e5f\u5e94\u8be5\u88ab\u6b63\u786e\u8bc6\u522b\uff0c\u5e76\u91cd\u5199\u4e3a\u542b\u6709 index.php \u7684 URL\uff0c\u6211\u7684\u601d\u8def\u662f\u7528<code>try_files<\/code>\u6765\u5b9e\u73b0\uff0c\u4f46\u662f\u6d4b\u8bd5\u540e\u5e76\u6ca1\u6709\u5f97\u5230\u60f3\u8981\u7684\u7ed3\u679c\uff0c\u8bf7\u95ee\u8fd9\u4e2a\u5e94\u8be5\u600e\u4e48\u7528 Nginx \u6765\u5b9e\u73b0\u5462\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3016428\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : qingdanmo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u662f\u6846\u67b6\u7684\u8bdd \u53bb\u770b\u4e0b\u6846\u67b6\u7684\u914d\u7f6e \u8bf4\u660e \u4e00\u822c\u5c31\u662f if -e file rewrite                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3016429\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : harrisliang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @qingdanmo \u611f\u8c22\u56de\u590d\uff0c\u4e0d\u662f\u7528\u7684\u6846\u67b6\uff0c\u5b8c\u5168\u624b\u5199\u7684 php \u6587\u4ef6\uff0c\u4e5f\u53c2\u8003\u4e86\u51e0\u4e2a\u6846\u67b6\u7684\u6587\u6863\uff0c\u611f\u89c9\u548c\u6211\u7684\u9700\u6c42\u4e0d\u5927\u4e00\u81f4                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3016430\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiri <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             location \/ {<br \/> index index.php;<br \/> try_files $uri $uri\/ \/index.php?$query_string;<br \/>}                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3016431\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ericgui <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiri +1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Nginx \u600e\u4e48\u914d\u7f6e\u8bbf\u95ee\u7684 URL&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/150440"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=150440"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/150440\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=150440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=150440"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=150440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}