Subdomain redirection to directory on another domain

Subdomain redirection to directory on another domain - 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 Subdomain redirection to directory on another domain error on your web browser. Problem :


I was wondering what is going to be the easiest way to do the following;



Point wibble.site1.com to site2.com/directory/



So that wibble.site1.com/index.php will read from site2.com/directory/index.php



Any guidance would be greatly appreciated, pretty much everything I have found online helps you jump around within your own domain or gets you to the root of another domain.


Solution :

If you have access to wibble.site1.com and if its server is Apache, you could a .htaccess with this :



<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %HTTPS !=on
RewriteCond %HTTP_HOST ^wibble.(.+)$ [NC]
RewriteRule ^(.*)$ http://site2.com/directory/$1 [R=301,L]
</IfModule>


It should work.


We hope that this article has helped you resolve the domains, 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?