{"id":1106,"date":"2010-10-15T09:22:48","date_gmt":"2010-10-15T13:22:48","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=1106"},"modified":"2013-03-20T08:43:16","modified_gmt":"2013-03-20T12:43:16","slug":"url-redirection-how-to-set-frame-forwarding-for-a-domain","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/url-redirection-how-to-set-frame-forwarding-for-a-domain","title":{"rendered":"URL Redirection: How to set Frame Forwarding for a domain?"},"content":{"rendered":"<p><strong>What is Frame Forwarding and How it is set?<\/strong><\/p>\n<p><span style=\"text-decoration: underline;\"><strong><span style=\"color: #0000ff;\">A few lines of Explanation<\/span>:<\/strong><\/span><\/p>\n<p>Frame forwarding (redirection) of a domain is different than normal forwarding of a domain. <strong><\/strong><\/p>\n<p>In <strong>Frame Forwarding<\/strong>, the visitors are redirected to another site, but the destination address is not displayed in the address bar, so they are not aware of the redirection as opposed to &#8220;Normal Forwading&#8221; (also called Parked domain).<\/p>\n<p>In\u00a0<strong>Normal Forwading<\/strong> the web site visitors are redirected to another site and the destination address is displayed in the address bar, so the visitor is aware about the redirection.<\/p>\n<p>For example, suppose the main website is abc.com and we frame forwarded xyz.com to it. When we access xyz.com, the URL in the address bar of the browser will stay as it is and the contents will be fetched from abc.com. The user won&#8217;t notice the redirection.<\/p>\n<p><span style=\"text-decoration: underline;\"><span style=\"color: #0000ff;\"><strong>Solution:<\/strong><\/span><\/span><\/p>\n<p>Using the above domain names as example, in order to set Frame Forwarding for xyz.com, first add the domain on the server as we normally do and add the following code in the index.html file<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">&lt;frameset rows=\"100%\", *' frameborder=no framespacing=0 border=0&gt; <\/span>\r\n<span style=\"color: #0000ff;\">&lt;frame src=\"http:\/\/www.abc.com\/\"&gt;&lt;\/frame&gt; <\/span>\r\n<span style=\"color: #0000ff;\">&lt;\/frameset&gt;<\/span><\/pre>\n<\/blockquote>\n<p>This is it.<\/p>\n<p><span style=\"text-decoration: underline;\"><span style=\"color: #0000ff;\"><strong>A Drawback of the above method and a Solution for it:<\/strong><\/span><\/span><\/p>\n<p>As you will be setting up a redirection in the index.html file, any other file\/directory accessed using a direct URL ( i.e. for example: xyz.com\/anyfilename) will result in a &#8220;404 Not Found&#8221; error.This is because the request will bypass the redirection set in the index.html file and will search for the file under the xyz.com itself.<\/p>\n<p>To overcome this problem, add xyz.com as a &#8220;<strong>ServerAlias<\/strong>&#8221; in the VirtualHost entry of abc.com. Edit the Apache configuration<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">vi \/etc\/httpd\/conf\/httpd.conf<\/span><\/pre>\n<\/blockquote>\n<p>Search for the VirtualHost entry of abc.com and make sure the &#8220;ServerAlias&#8221; line look like the following<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">ServerAlias www.abc.com xyz.com www.xyz.com<\/span><\/pre>\n<\/blockquote>\n<p>Save the file and restart the Web server<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">service httpd restart<\/span><\/pre>\n<\/blockquote>\n<p>Now, directly accessing a file or directory of a target domain using the alias domain name will also work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Frame Forwarding and How it is set?<br \/>\nA few lines of Explanation:<br \/>\nFrame forwarding (redirection) of a domain is different than normal forwarding of a domain.<br \/>\nIn Frame Forwarding, the visitors are redirected to another site, but the destination address is not displayed in the address bar, so they are not aware of the redirection as opposed to &#8220;Normal Forwading&#8221; (also called Parked domain).<br \/>\nIn\u00a0Normal Forwading the web site visitors are redirected to another site and the destination address is displayed in the address bar, so the visitor is [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[1094,1099,1100,1097,1095,1096,1098],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1106"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=1106"}],"version-history":[{"count":10,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1106\/revisions"}],"predecessor-version":[{"id":2217,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/1106\/revisions\/2217"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=1106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=1106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=1106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}