title: How To Redirect Non Existing URL's to the HomePage, When my site is in a Sub-directory....?
body: <p>I had this .htaccess code which worked fine when my site and its files were in the home root folder, but I changed to a new host that already had domains on it, so my site is now in a SUBDIRECTORY and the following code no longer works:</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^MyDomain.com$ [OR]
  RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html
  RewriteRule ^(index\.html)?$ http://www.MyDomain.com/ [L,R=301]
  </code></pre>
  
  <p>How do I modify it to make it work, do I need to include the subdirectory name in it? Right now if I typed in a non existing url "MyDomain.com/blahblah567 ....it just shows "page not found" type of thing. </p>
  
  <p>Thanks</p>