0

I have a server running 3 Apache Virtual Hosts. they are xxxxxxxxx.com , wiki.xxxxxxxx.com and yyyyyyyyy.com

So what I have been trying to do is get the server to act like a proxy so that when a client asks for xxxxxxxxxx.com/wiki/ I want apache to forward the request to wiki.xxxxxxx.com

I searched online but most instruction don't seem to work and includes instructions in regard to the obsolete httpd.conf file.

Please help me resolve this.

1 Answer 1

0

Take a look at this:

https://stackoverflow.com/questions/2738789/apache-mod-rewrite-help-send-folder-to-subdomain

Mod-Rewrite will do the trick for you.

RewriteCond %{REQUEST_URI} ^/wiki/(.*)
RewriteRule ^(/.*) http://wiki.xxxxxxxxx.com$1 [L,R=301]

You'll put this in a .htaccess file at the root of your xxxxxxxxx.com directory. You need to make sure to allow override in the httpd.conf.

2
  • No, this one is almost like a redirect, I need the users to continue to see xxxxxxx.com/wiki/...... while the content is fetched from wiki.xxxxxxx.com
    – BMC
    Mar 12, 2013 at 17:25
  • If they're on the same server, you can just get rid of ,R=301 from the rewrite rule.
    – newswami
    Mar 12, 2013 at 20:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .