I’m trying to proxy missing images from my Local site from production. Both are installed in a /blog/ subdirectory and both run Apache.
So I added the following .htaccess rule:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ #Redirect WordPress uploads RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule wp-content/uploads/(.*)$ https://www.example.com/blog/wp-content/uploads/$1 [R=302,L,NC] </IfModule>
But I’m getting errors in the apache log
[proxy:warn] [pid 317:tid 140026654447360] [client 172.17.0.1:58358] AH01144: No protocol handler was valid for the URL /blog/wp-content/uploads/2018/07/kitten.jpg. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: http://example.local/blog/
I tried copying some mods from /conf/apache/mods-available to mods-enabled but that just broke the whole thing.
How do I properly get this configured?