Created
June 6, 2023 10:24
-
-
Save nczz/e5c854ae790d177443cbc6a2c48e2dbd to your computer and use it in GitHub Desktop.
Nginx 設定測試站靜態資源轉請求,減少測試站備份的容量
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ /wp-content/uploads/.* { | |
if (!-f $request_filename) { | |
rewrite ^/wp-content/uploads/(.*)$ https://www.mxp.tw/wp-content/uploads/$1 redirect; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment