{"id":311,"date":"2010-01-25T05:36:35","date_gmt":"2010-01-25T03:36:35","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=311"},"modified":"2010-01-25T05:38:22","modified_gmt":"2010-01-25T03:38:22","slug":"how-to-redirect-a-web-page-cesit-cesit-web-sayfasi-sitesi-yonlendirme","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2010\/01\/25\/how-to-redirect-a-web-page-cesit-cesit-web-sayfasi-sitesi-yonlendirme\/","title":{"rendered":"How to Redirect a Web Page &#8211; \u00c7e\u015fit \u00c7e\u015fit Web Sayfas\u0131 \/ Sitesi Y\u00f6nlendirme"},"content":{"rendered":"<p>Web sayfa veya sitemizi y\u00f6nlendirmek i\u00e7in 301 redirect kodunu kullan\u0131yoruz.<\/p>\n<p>SEO i\u00e7in en iyisi ve g\u00fczeli budur.<\/p>\n<h2>IIS Redirect<\/h2>\n<ul>\n<li>In internet services manager, right click on the file or folder you wish to redirect<\/li>\n<li>Select the radio titled &#8220;a redirection to a URL&#8221;.<\/li>\n<li>Enter the redirection page<\/li>\n<li>Check &#8220;The exact url entered above&#8221; and the &#8220;A permanent redirection for this resource&#8221;<\/li>\n<li>Click on &#8216;Apply&#8217;<\/li>\n<\/ul>\n<h2>ColdFusion Redirect<\/h2>\n<p><span> &lt;.cfheader statuscode=&#8221;301&#8243; statustext=&#8221;Moved permanently&#8221;&gt;<br \/>\n&lt;.cfheader name=&#8221;Location&#8221; value=&#8221;http:\/\/www.new-url.com&#8221;&gt; <\/span><\/p>\n<h2>PHP Redirect<\/h2>\n<p><span>&lt;?<br \/>\nHeader( &#8220;HTTP\/1.1 301 Moved Permanently&#8221; );<br \/>\nHeader( &#8220;Location: http:\/\/www.new-url.com&#8221; );<br \/>\n?&gt; <\/span><\/p>\n<h2>ASP Redirect<\/h2>\n<p><span> &lt;%@ Language=VBScript %&gt;<br \/>\n&lt;%<br \/>\nResponse.Status=&#8221;301 Moved Permanently&#8221;<br \/>\nResponse.AddHeader &#8220;Location&#8221;,&#8221;http:\/\/www.new-url.com\/&#8221;<br \/>\n%&gt; <\/span><\/p>\n<h2>ASP .NET Redirect<\/h2>\n<p><span> &lt;script runat=&#8221;server&#8221;&gt;<br \/>\nprivate void Page_Load(object sender, System.EventArgs e)<br \/>\n{<br \/>\nResponse.Status = &#8220;301 Moved Permanently&#8221;;<br \/>\nResponse.AddHeader(&#8220;Location&#8221;,&#8221;http:\/\/www.new-url.com&#8221;);<br \/>\n}<br \/>\n&lt;\/script&gt; <\/span><\/p>\n<h2>JSP (Java) Redirect<\/h2>\n<p><span> &lt;%<br \/>\nresponse.setStatus(301);<br \/>\nresponse.setHeader( &#8220;Location&#8221;, &#8220;http:\/\/www.new-url.com\/&#8221; );<br \/>\nresponse.setHeader( &#8220;Connection&#8221;, &#8220;close&#8221; );<br \/>\n%&gt; <\/span><\/p>\n<h2>CGI PERL Redirect<\/h2>\n<p><span> $q = new CGI;<br \/>\nprint $q-&gt;redirect(&#8220;http:\/\/www.new-url.com\/&#8221;); <\/span><\/p>\n<h2>Ruby on Rails Redirect<\/h2>\n<p><span> def old_action<br \/>\nheaders[&#8220;Status&#8221;] = &#8220;301 Moved Permanently&#8221;<br \/>\nredirect_to &#8220;http:\/\/www.new-url.com\/&#8221;<br \/>\nend <\/span><\/p>\n<h2>Redirect Old domain to New domain (htaccess redirect)<\/h2>\n<p>Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.<br \/>\nThe .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)<\/p>\n<p>Options +FollowSymLinks<br \/>\nRewriteEngine on<br \/>\nRewriteRule (.*) http:\/\/www.newdomain.com\/$1 [R=301,L]<\/p>\n<p>Please REPLACE www.newdomain.com in the above code with your actual domain name.<\/p>\n<p>In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.<\/p>\n<p><strong>Note*<\/strong> This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.<\/p>\n<h2>Redirect to www (htaccess redirect)<\/h2>\n<p>Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com<br \/>\nThe .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)<\/p>\n<p>Options +FollowSymlinks<br \/>\nRewriteEngine on<br \/>\nrewritecond %{http_host} ^domain.com [nc]<br \/>\nrewriterule ^(.*)$ http:\/\/www.domain.com\/$1 [r=301,nc]<\/p>\n<p>Please REPLACE domain.com and www.newdomain.com with your actual domain name.<\/p>\n<p><strong>Note*<\/strong> This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Web sayfa veya sitemizi y\u00f6nlendirmek i\u00e7in 301 redirect kodunu kullan\u0131yoruz. SEO i\u00e7in en iyisi ve g\u00fczeli budur. IIS Redirect In internet services manager, right click on the file or folder you wish to redirect Select the radio titled &#8220;a redirection to a URL&#8221;. Enter the redirection page Check &#8220;The exact url entered above&#8221; and the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":3,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":314,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/311\/revisions\/314"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}