{"id":1558,"date":"2011-03-08T22:45:32","date_gmt":"2011-03-08T22:45:32","guid":{"rendered":"http:\/\/www.codingfriends.com\/?p=1558"},"modified":"2011-03-08T22:46:00","modified_gmt":"2011-03-08T22:46:00","slug":"rewrite-engine","status":"publish","type":"post","link":"https:\/\/www.codingfriends.com\/index.php\/2011\/03\/08\/rewrite-engine\/","title":{"rendered":"Rewrite Engine"},"content":{"rendered":"<p>Because I own the codingfriends.co.uk, but would like to point that to the www.codingfriends.com <\/p>\n<p>Here is a good way to make it so that any requests to the domain name codingfriends.co.uk (rewrite condition of the host record) will redirect to www.codingfriends.com with a redirection of HTTP 301 (moved permanently). <\/p>\n<pre lang=\"script\">\r\nRewriteEngine On\r\nRewriteCond ${HTTP_HOST} !^(www)\\.codingfriends\\.co\\.uk \r\nRewriteRule (.*) http:\/\/www.codingfriends.com\/$1 [L,R=301]\r\n<\/pre>\n<p>Save that to the .htaccess root directory file.  Hope that helps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Because I own the codingfriends.co.uk, but would like to point that to the www.codingfriends.com Here is a good way to make it so that any requests to the domain name codingfriends.co.uk (rewrite condition of the host record) will redirect to www.codingfriends.com with a redirection of HTTP 301 (moved permanently). RewriteEngine On RewriteCond ${HTTP_HOST} !^(www)\\.codingfriends\\.co\\.uk RewriteRule &hellip; <a href=\"https:\/\/www.codingfriends.com\/index.php\/2011\/03\/08\/rewrite-engine\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Rewrite Engine<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[327,18,328],"class_list":["post-1558","post","type-post","status-publish","format-standard","hentry","category-linux_install_configure","tag-htaccess","tag-apache","tag-rewriteengine"],"_links":{"self":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/1558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/comments?post=1558"}],"version-history":[{"count":2,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/1558\/revisions"}],"predecessor-version":[{"id":1560,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/1558\/revisions\/1560"}],"wp:attachment":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/media?parent=1558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/categories?post=1558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/tags?post=1558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}