title: How to make all cakephp files to inner folder access from base?
body: <p>Currently my Cake structure is like below and is working fine</p>
  
  <pre><code>/public_html/app 
  /public_html/.htaccess
  /public_html/index.php
  </code></pre>
  
  <p>So that I can access <strong>mydomain.com</strong>  to my application.</p>
  
  <p>I need to create new inner folder called <code>src</code> and put all files in public_html*. </p>
  
  <p>Like <code>/public_html/*</code> to <code>/public_html/src/*</code></p>
  
  <pre><code>/public_html/src/app 
  /public_html/src/.htaccess
  /public_html/src/index.php
  </code></pre>
  
  <p>I need to  access <strong>mydomain.com</strong> from src folder files.</p>
  
  <p>I tried with creating an <strong>htaccess</strong> file <code>public_html/.htaccess</code> </p>
  
  <p><strong>/public_html/.htaccess</strong></p>
  
  <pre><code>   RewriteEngine on
     RewriteRule    ^$ src/    [L]
     RewriteRule    (.*) src/$1 [L]
  </code></pre>
  
  <p>and put all files in cake framework new inner folder <code>src</code>. It gives me an Internal Server Error.</p>
  
  <p>Then I created a <strong>index.php</strong> file <code>public_html/index.php</code> and deleted htaccess(<code>public_html/.htaccess</code>) present in public_html.</p>
  
  <p><strong>index.php</strong></p>
  
  <pre><code>define('SRC_DIR', 'src');
  define('DS', DIRECTORY_SEPARATOR);
  require SRC_DIR . DS . 'index.php';// src/index.php file
  </code></pre>
  
  <p>But It goes to page, but styles and images are not coming. Routes are not working.</p>
  
  <p><strong>public_html</strong> is base path.</p>
  
  <p>How to make this correct in cakephp2 ?</p>