{"id":132,"date":"2010-12-03T12:37:58","date_gmt":"2010-12-03T20:37:58","guid":{"rendered":"http:\/\/www.joesuttle.com\/techblog\/?p=132"},"modified":"2010-12-03T12:37:58","modified_gmt":"2010-12-03T20:37:58","slug":"301-redirect-in-apache","status":"publish","type":"post","link":"https:\/\/joesuttle.com\/techblog\/?p=132","title":{"rendered":"301 Redirect in Apache"},"content":{"rendered":"<p>Found a cool website for grading your website (check SEO and how well it&#8217;s working) &#8211; <a title=\"website grader\" href=\"http:\/\/websitegrader.com\/\" target=\"_blank\">Website Grader<\/a>. When I ran the test for one of my domains, it gave me a warning that my website &#8220;mydomain.com&#8221; might not get routed to the same place as &#8220;www.mydomain.com&#8221;. It talked about maybe programming a &#8220;301 Redirect&#8221;.<\/p>\n<p>A quick web search for how to handle 301 Redirects got me instructions for IIS and other web servers, along with some instructions for using &#8220;Mod-rewrite&#8221;. There were instructions for PHP, ASP, JSP, CGI PERL and Ruby on Rails (<a title=\"webconf.com Site\" href=\"http:\/\/www.webconfs.com\/how-to-redirect-a-webpage.php\" target=\"_blank\">http:\/\/www.webconfs.com\/how-to-redirect-a-webpage.php<\/a>). But where were the plain old Apache instructions.<br \/>\nAnother search took me to <a title=\"Dave Taylor's Site\" href=\"http:\/\/www.askdavetaylor.com\/how_do_i_add_a_301_redirect_to_my_apache_httpdconf.html\" target=\"_blank\">Dave Taylor&#8217;s<\/a> page, and although not exactly what I needed, it pointed me to what I needed to do. Since I am running Apache 2.x, had to go to the &#8220;vhosts.conf&#8221; file and make the necessary changes.<\/p>\n<p>Dave&#8217;s recommendation was:<\/p>\n<blockquote><p>&lt;VirtualHost hisdomain.com&gt;<br \/>\nRedirect 301 \/ <a id=\"KonaLink2\" href=\"http:\/\/www.askdavetaylor.com\/how_do_i_add_a_301_redirect_to_my_apache_httpdconf.html#\" target=\"undefined\"><span style=\"color: #111166;\">http<\/span><\/a>:\/\/www.hisdomain.com\/<br \/>\n&lt;\/VirtualHost&gt;<\/p><\/blockquote>\n<p>But that <strong>did not work<\/strong>, since I have multiple domains coming in to one IP address. His suggestion (if that was the case) was:<\/p>\n<blockquote><p>&lt;VirtualHost 70.84.11.36&gt; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Found a cool website for grading your website (check SEO and how well it&#8217;s working) &#8211; Website Grader. When I ran the test for one of my domains, it gave me a warning that my website &#8220;mydomain.com&#8221; might not get &#8230; <a class=\"more-link\" href=\"https:\/\/joesuttle.com\/techblog\/?p=132\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,38],"tags":[34,17,35,36,37,39],"_links":{"self":[{"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=\/wp\/v2\/posts\/132"}],"collection":[{"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=132"}],"version-history":[{"count":0,"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=\/wp\/v2\/posts\/132\/revisions"}],"wp:attachment":[{"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joesuttle.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}