{"id":129,"date":"2010-02-17T22:07:19","date_gmt":"2010-02-18T05:07:19","guid":{"rendered":"http:\/\/www.nathalielawhead.com\/candybox\/htaccess-fun"},"modified":"2010-02-17T22:33:48","modified_gmt":"2010-02-18T05:33:48","slug":"htaccess-fun","status":"publish","type":"post","link":"http:\/\/www.nathalielawhead.com\/candybox\/htaccess-fun","title":{"rendered":".htaccess fun"},"content":{"rendered":"<p>This website:<\/p>\n<p><a href=\"http:\/\/tips-scripts.com\/undefined\">http:\/\/tips-scripts.com\/undefined<\/a><\/p>\n<p>Is fucking awesome. I&#8217;ve been melting my brain trying to figure out if it&#8217;s possible to strip off nonexisting subdomains, and couldn&#8217;t get my head around it for the life of me&#8230; Turns out the .htaccess file comes in to save the day&#8230; again.<br \/>\nI came across this:<\/p>\n<p>RewriteEngine On<br \/>\nRewriteCond %{HTTP_HOST} ^(.+)\\.([^\\.]+\\.[^\\.]+)$<br \/>\nRewriteCond %1 !^(www)$<br \/>\nRewriteCond %{HTTP_HOST} !^[0-9\\.]+$<br \/>\nRewriteRule ^(.*)$ http:\/\/%2\/$1 [R,L]<\/p>\n<p>And had to repost it just because of it&#8217;s pure usefulness, and perhaps it will help someone else out with the same problem.<\/p>\n<p>Not only that but here&#8217;s more:<br \/>\n<a href=\"http:\/\/forums.devshed.com\/apache-development-15\/mod-rewrite-guide-common-requests-267522.html\">Mod Rewrite Guide<\/a><br \/>\n<a href=\"http:\/\/kb.siteground.com\/article\/URL_Masking_with_htaccess.html\">URL Masking<\/a><br \/>\n<a href=\"http:\/\/www.crucialwebhost.com\/blog\/htaccess-apache-and-rewrites-oh-my\">Rewrites<\/a><\/p>\n<p>Yet again the simplest solution is always the best&#8230; I wish I where more simple-minded.<\/p>\n<p>For Spiders:<br \/>\ntruncate subdomain remove subdomain from domain name htaccess subdomain<\/p>\n<p>And something completely random&#8230;<br \/>\nIf you&#8217;re looking to make a little (or a lot of) money on the side, keep an eye on the following:<br \/>\n<a href=\"http:\/\/pleaserobme.com\/\">http:\/\/pleaserobme.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This website: http:\/\/tips-scripts.com\/undefined Is fucking awesome. I&#8217;ve been melting my brain trying to figure out if it&#8217;s possible to strip off nonexisting subdomains, and couldn&#8217;t get my head around it for the life of me&#8230; Turns out the .htaccess file comes in to save the day&#8230; again. I came across this: RewriteEngine On RewriteCond %{HTTP_HOST} ^(.+)\\.([^\\.]+\\.[^\\.]+)$ RewriteCond %1 !^(www)$ RewriteCond %{HTTP_HOST} !^[0-9\\.]+$ RewriteRule ^(.*)$ http:\/\/%2\/$1 [R,L] And had to repost it just because of it&#8217;s pure usefulness, and perhaps it will help someone else out with the same problem. Not only that but here&#8217;s more: Mod Rewrite Guide URL Masking&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":4522,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[12],"tags":[],"class_list":["post-129","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-resources"],"_links":{"self":[{"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":0,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/media\/4522"}],"wp:attachment":[{"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}