apache - htaccess redirect subdomain to subfolder of another domain -


i'm using .htaccess proxy redirect content of subdomain subfolder of domain as: www.domain1.com/support show content site1-support.domain2.com

while keeping address bar showing hxxp://www.domain1.com/support.

to this, i've created empty folder called "support" under www.domain1.com , add .htaccess:

<ifmodule mod_rewrite.c> rewriteengine on rewriterule ^/?support/(.*)$ http://site1-support.domain1.com/$1?proxy=http://site1-support.domain2.com [p] </ifmodule> 

this works, whenever there ? in url doesn't show page, such hxxp://www.domain1.com/kb.php?article=1

any htaccess gurus out there?

if want forward article=1 redirectrule should add qsa flag.

rewriterule ^/?support/(.*)$ http://site1-support.domain1.com/$1?proxy=http://site1-support.domain2.com [qsa,p] 

hope helps, , understood question correctly. :)


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -