{"id":139,"date":"2010-07-21T15:13:29","date_gmt":"2010-07-21T21:13:29","guid":{"rendered":"http:\/\/www.crccheck.com\/blog\/?p=139"},"modified":"2015-10-11T22:29:09","modified_gmt":"2015-10-12T04:29:09","slug":"a-simple-htaccess-line-for-microsites","status":"publish","type":"post","link":"https:\/\/www.crccheck.com\/blog\/a-simple-htaccess-line-for-microsites\/","title":{"rendered":"A simple htaccess line for microsites"},"content":{"rendered":"<p>If you&#8217;re running a simple site, you may find that using even one sub-directory is overkill. You have one CSS, one JS, and one HTML for the entire site, and name them after your project. If you&#8217;re like me, and end up working on multiple sites at a time, it helps if the file names are simple and named after the project. Where that fails is your main &#8220;index.html&#8221;. I&#8217;ve played with redirecting to a project.html file, or having a splash page index.html that redirected. But my solution-de-jour is adding a line to my .htaccess file:<\/p>\n<p style=\"padding-left: 30px;\"><code>DirectoryIndex my_awesome_project.html<br \/>\n<\/code><\/p>\n<p>which tells apache to serve my project html when looking for an index file. This is basically a very specific redirect, but you don&#8217;t have to serve any possibly sketchy 301 or 302 redirects.<\/p>\n<p>Now I don&#8217;t have to guess which of the four &#8220;index.html&#8221; files I&#8217;m working on go to what.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re running a simple site, you may find that using even one sub-directory is overkill. You have one CSS, one JS, and one HTML for the entire site, and name them after your project. If you&#8217;re like me, and end up working on multiple sites at a time, it helps if the file names&hellip;<\/p>\n <a href=\"https:\/\/www.crccheck.com\/blog\/a-simple-htaccess-line-for-microsites\/\" title=\"A simple htaccess line for microsites\" class=\"entry-more-link\"><span>Read More<\/span> <span class=\"screen-reader-text\">A simple htaccess line for microsites<\/span><\/a>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[1],"tags":[26],"class_list":["entry","author-showmewhatyougot","post-139","post","type-post","status-publish","format-standard","category-uncategorized","tag-apache"],"_links":{"self":[{"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":4,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":769,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/posts\/139\/revisions\/769"}],"wp:attachment":[{"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}