somewhat working bmj, but still broken
[via-proxy] / p.vbz.ffzg.hr.conf
index f072fc9..e23ef16 100644 (file)
@@ -483,6 +483,20 @@ FilterChain NEWPATHS2
 
        ServerName journals.bmj.com.p.vbz.ffzg.hr
 
+       RequestHeader unset Accept-Encoding
+       Substitute "s|(http:)?//(\w+)\.bmj\.com/|https://journals.bmj.com.p.vbz.ffzg.hr/_rewrite_/$2/_path_/|"
+#      Substitute "s|//(.*)\.bmj\.com/|//journals.bmj.com.p.vbz.ffzg.hr/_rewrite_/$1/_path_/|"
+       FilterDeclare NEWPATHS
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/javascript|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^application/javascript|"
+       FilterChain NEWPATHS
+
+       # fix all other plain http resources
+       RewriteEngine on
+       RewriteRule     /_rewrite_/(.*)/_path_/(.*)     http://$1.bmj.com/$2 [P,L]
+
        #SSLProxyEngine on
        ProxyPass        / http://journals.bmj.com/
        ProxyPassReverse / http://journals.bmj.com/
@@ -513,6 +527,18 @@ FilterChain NEWPATHS2
 
        ServerName ieeexplore.ieee.org.p.vbz.ffzg.hr
 
+       RequestHeader unset Accept-Encoding
+       Substitute "s|http://staticieeexplore.ieee.org/|https://ieeexplore.ieee.org.p.vbz.ffzg.hr/_static_/|n"
+       FilterDeclare NEWPATHS
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/javascript|"
+       FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^application/javascript|"
+       FilterChain NEWPATHS
+
+       ProxyPass        /_static_/ http://staticieeexplore.ieee.org/
+       ProxyPassReverse /_static_/ http://staticieeexplore.ieee.org/
+
        # IEEE Xplore is transitioning to HTTPS on 9 April 2018.
        #SSLProxyEngine on
        ProxyPass        / http://ieeexplore.ieee.org/