Forum Moderators: phranque
RedirectMatch 301 ^/$ /forums/
ProxyPass /forums/ http://server2.domain.com/forums/
ProxyPassReverse /forums/ \ http://server2.domain.com/forums/
and rewriterule what i am using is.
RewriteCond %{HTTP_HOST} ^server\.domain\.com
RewriteRule ^(.*)$ http://server2.domain.com/forums/$1 [P]
ProxyPassReverse /forums/ http://server2.domain.com/forums/
this is working with one execption server2 content is seen in server.domain.com url with no /forums/ howto do rule which redirects asked ^(.*)$ so that server.domain.com/forums/ is shown in requested url.
[edited by: jdMorgan at 2:31 pm (utc) on April 5, 2006]
[edit reason] De-linked [/edit]
Welcome to WebmasterWorld!
Three points which may bear on the problem:
1) Directives are not executed strictly in the order that you specify. They are executed in module order. For example, all mod_alias directives will execute, then all mod_proxy diretives will execute, and then all mod_rewrite directives will execute (Each module parses the config files and executes the directives that it recognizes).
That's just an example -- the modules will execute in the reverse order the they are loaded (by LoadModule) on Apache 1.x, and in the order determined by Apache 2.x priority scheme. This can have various unexpected results.
2) Why is the backslash character in this line?
ProxyPassReverse /forums/ [b]\[/b] http://server2.domain.com/forums/ 3) According to the mod_proxy documentation [httpd.apache.org],
Note that this ProxyPassReverse directive can also be used in conjunction with the proxy pass-through feature ("RewriteRule ... [P]") from mod_rewrite because its doesn't depend on a corresponding ProxyPass directive.
Jim