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!

link|improve this question

73% accept rate
Guys, also, a simple redirect would work as well I think... testing that out – Clustermagnet 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. – KM01 Apr 3 '11 at 2:27
feedback

2 Answers

up vote 2 down vote accepted

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.

link|improve this answer
feedback

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

but this certainly will not keep your URL structure

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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