Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
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

2 Answers 2

up vote 3 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.

share|improve this answer

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

but this certainly will not keep your URL structure

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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