{"id":383,"date":"2007-03-18T19:27:00","date_gmt":"2007-03-18T19:27:00","guid":{"rendered":"http:\/\/blog.agm.me.uk\/blog\/2007\/03\/the-www-rewritecond.php"},"modified":"2010-10-20T22:22:15","modified_gmt":"2010-10-20T21:22:15","slug":"www-rewritecond","status":"publish","type":"post","link":"https:\/\/blog.agm.me.uk\/blog\/2007\/03\/www-rewritecond.php","title":{"rendered":"The &#8220;www&#8221; RewriteCond"},"content":{"rendered":"<p>I have just tweaked my web site configuration (hosted by <a href=\"http:\/\/www.steelpixel.com\">SteelPixel<\/a>) so it does not redirect &#8220;agm.me.uk&#8221; to &#8220;www.agm.me.uk&#8221; but still prefixes the www to all other pages.<\/p>\n<p>The reason why I have done this is because of <a href=\"http:\/\/www.openid.net\">OpenID<\/a>. I use the root of my web site as an open ID as it is quick to type in and I have full control, but until now when I type in agm.me.uk my OpenID login annoyingly becomes www.agm.me.uk.<\/p>\n<p>The following needed adding to the &#8220;.htaccess&#8221; file in the route of my web site for it to work. The second and third lines are those that I have just added, and you need them both for reasons that I can not currently fathom.<\/p>\n<blockquote><p>RewriteEngine on<br \/>\nRewriteCond %{REQUEST_URI} !^\/$<br \/>\nRewriteCond %{REQUEST_URI} !^\/index.php$<br \/>\nRewriteCond %{HTTP_HOST} ^agm.me.uk [NC]<br \/>\nRewriteRule ^(.*)$ http:\/\/www.agm.me.uk\/$1 [L,R]<\/p><\/blockquote>\n<p>Naturally all this is fairly pointless in the global scheme of things, but I feel better now. I have also added a search facility for all my sites using <a href=\"http:\/\/www.google.co.uk\/coop\/\">Google Co-op<\/a> that is slightly more usful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have just tweaked my web site configuration (hosted by SteelPixel) so it does not redirect &#8220;agm.me.uk&#8221; to &#8220;www.agm.me.uk&#8221; but still prefixes the www to all other pages. The reason why I have done this is because of OpenID. I use the root of my web site as an open ID as it is quick [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-tech"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4t60H-6b","_links":{"self":[{"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":3,"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"predecessor-version":[{"id":1107,"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions\/1107"}],"wp:attachment":[{"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.agm.me.uk\/blog\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}