1
因此,我無法將IIS中的此重寫規則轉換爲Apache。在IIS中工作良好,但在Apache中完全沒有。將IIS重寫規則轉換爲Apache
原始IIS重寫規則:
<rule
enabled="true"
stopProcessing="true"
name="Route API calls to test server」>
<match url="(api/.*)" />
<action type="Rewrite" url="http://api.testdomain.com/{R:1}" />
</rule>
我正在嘗試
阿帕奇規則:
RewriteEngine on
RewriteRule ^api/(.*)$ http://api.testdomain.com/$1 [P]
你想代理這個請求,或者只是重定向/重寫到新的網址是什麼? –
代理。想想我已經想通了。在下面回答。 –