title: .htaccess file configuration for public section of my website
body: <p>I am trying to deploy my site online and the <code>.htaccess</code> file which worked perfectly in the <code>localhost</code> seem not be be working the same way on my share hosting domain. </p>
  
  <p>i have a <code>public</code> folder in the root(htdocs) folder which is meant to serve the public files and I used two <code>.htaccess</code> files one in the public directory and the other in the the root(<code>htdocs</code>) folder.</p>
  
  <p>.htaccess for htdocs folder</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^mysite\.morehere\.net$ [OR]
  RewriteCond %{HTTP_HOST} ^www\.mysite\.morehere\.net$
  RewriteCond %{REQUEST_URI} !^/public/
  RewriteRule (.*) /public/$1
  </code></pre>
  
  <p>and that of the public directory</p>
  
  <pre><code># --- Homepage
  RewriteRule ^home$ index.php [NC]
  RewriteRule ^home/$ index.php [NC,L]
  
  # --- articles page
  RewriteRule ^articles $ articles.php [NC]
  RewriteRule ^articles /$ articles.php [NC]
  ........
  </code></pre>
  
  <p>My intention is to make the URLs search engine friendly and appealing to users. </p>
  
  <p>Edit: I have made sure <code>mod_rewrite</code> on the production server is turns on but the pages still gets redirected to the not found page.</p>
  
  <p>Like <code>mysite.morehere.net/home/</code> is redirected to the not found page</p>
  
  <p>Can anyone please help me out to figure out where the problem is.</p>