Mobile app version of vmapp.org
Login or Join
Looi9037786

: Two different websites in one remote hosting My client asked me that a website that is hosted in one server (and pointing there through a domain) should also be accessed (into a specific directory)

@Looi9037786

Posted in: #Htaccess #Redirects

My client asked me that a website that is hosted in one server (and pointing there through a domain) should also be accessed (into a specific directory) from another domain, which is not pointing there. For example:
www.foo.com, hosted at GoDaddy, with the full website
www.bar.com, hosted at Bluehost, needs to access www.foo.com/bar, as if it was the www.bar.com's root.

So, if anybody enters through www.bar.com, it should internally load www.foo.com/bar, without visually changing the url.

I amb not sure if this is possible using .htaccess or anything like this. Could anybody show me some light? Thanks in advance

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Looi9037786

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kevin317

Something like this?

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !bar.com$ [NC]
RewriteRule ^(.*)$ www.foo.com/bar/ [L,R=301]


I found this in an article by searching for "rewrite all calls to other domain htacces".

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme