Two different websites in one remote hosting

Two different websites in one remote hosting - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Two different websites in one remote hosting error on your web browser. Problem :


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:



http://www.foo.com, hosted at GoDaddy, with the full website



http://www.bar.com, hosted at Bluehost, needs to access http://www.foo.com/bar, as if it was the http://www.bar.com's root.



So, if anybody enters through http://www.bar.com, it should internally load http://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


Solution :

Something like this?



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


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


We hope that this article has helped you resolve the htaccess, redirects, error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

Redirected urls show in serp, with the original permalink but with the title and meta of the target page

How can I redirect everything but the index as 410?

How do I redirect traffic only if being accessed from a specific port?