【发布时间】:2020-03-09 11:42:05
【问题描述】:
我在 nginx 上运行一个 wordpress 网站,除了我的一个插件 = Adaptive Images for WordPress 之外,所有的工作都像一个魅力。 (此插件提供缩放图像)。
这个插件的所有者说,将它添加到位置,但它不起作用。
location / {
rewrite \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php;
}
也试过这个:
location ~ /wp-content/(themes|uploads) {
rewrite \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php;
}
还有这个:
location ~ /wp-content/(themes|uploads) {
rewrite \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php;
}
没有任何效果!
这是我的 nginx 配置:https://github.com/stonedb00/stonedb/blob/master/nginxconf
所以我需要一位 nginx 专家来给我正确的重写配置并解决它!
提前致谢
【问题讨论】:
标签: wordpress nginx nginx-location nginx-config