我正在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专家给我正确的重写配置并解决它!
预先感谢