0

Guys! Having a problem with apache mod_proxy, hoping someone can help

Preface: We need a new domain (http://section1.info) to direct users to (http://domain.info/?q=section1) and maintain section1.info in the URLs.

The following does not seem to work:

ProxyRequests Off
<Proxy *>
        Order deny,allow
        Allow from all
</Proxy>
ProxyPass               /       http://domain.info/?q=section1
ProxyPassReverse        /       http://domain.info/?q=section1

Thanks!

CMag
  • 707
  • 2
  • 11
  • 32
  • Guys, also, a simple redirect would work as well I think... testing that out – CMag Apr 02 '11 at 23:22
  • Set the Apache log level to "debug", restart (graceful works too) and examine your logs to see why this is not working. Google the errors in the log, if nothing helps, post the errors from your logs here. – KM. Apr 03 '11 at 02:27

2 Answers2

3

Unfortunately, ProxyPass does not accept query strings. If you are OK with using mod_rewrite:

RewriteCond %{HTTP_HOST} section1.info$
RewriteRule (.*) http://domain.info/?q=section1 [P]

Where, [P] is the proxy flag, which requires the mod_proxy to still be enabled along with mod_rewrite

Hope this helps.

clmarquart
  • 456
  • 3
  • 5
0

a workaround is simple, Redirect / http://domain.info/?q=section1

but this certainly will not keep your URL structure

CMag
  • 707
  • 2
  • 11
  • 32