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!

  • Guys, also, a simple redirect would work as well I think... testing that out – CMag Apr 2 '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 3 '11 at 2:27
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.

0

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

but this certainly will not keep your URL structure

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.