Apache 2.4 reverse proxy with URL substitution.
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
# Turn compression off in order for the Substitute to work. | |
RequestHeader unset Accept-Encoding "expr=%{REQUEST_URI} =~ m#^/news#" | |
# http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#examples | |
ProxyPass /news http://newspaper.ipage.am | |
ProxyPassReverse /news http://newspaper.ipage.am | |
Substitute "s|http://newspaper.ipage.am|http://mercatos.net/news|n" | |
# In order for the substitute module to work we have to add it to the filter chain. | |
FilterDeclare Substitute | |
FilterProvider Substitute SUBSTITUTE "%{REQUEST_URI} =~ m#^/news#" | |
FilterChain +Substitute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment