Development - File Structure for standard application

Below the File Structure for standard application:

protected/.htaccess - htaccess file denies access to protected directory from all
deny from all

templates/.htaccess - htaccess file denies access to all PHP files in templates directory
<FILES ~ "\.php$">
order allow,deny  
deny from all  
</FILES>

.htaccess - htaccess file converts all requests into url parameter and perform following directives
# Rewrite URL rules
<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # Exclude images from rewriting rules
    RewriteCond %{REQUEST_URI} !(\.gif|\.jpg|\.jpeg|\.png|\.bmp)$ [NC]
    # Exclude fonts from rewriting rules
    RewriteCond %{REQUEST_URI} !(\.eot|\.woff|\.woff2|\.svg)$ [NC]
    # Exclude css files from rewriting rules
    RewriteCond %{REQUEST_URI} !(\.css)$ [NC] 
    # Exclude Javascript files from rewriting rules
    RewriteCond %{REQUEST_URI} !(\.js)$ [NC]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l
    
    # Rewrite all other URLs to index.php/URL
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

# Error document
<IfModule !mod_rewrite.c>
    ErrorDocument 404 index.php
</IfModule>

<Limit PUT DELETE>
    order deny,allow
    deny from all
</Limit>

Options All -Indexes

index.php - main HTTP request dispatcher file
// Change the following paths if necessary
defined('APPHP_PATH') || define('APPHP_PATH', dirname(__FILE__));
// Directory separator
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
// Production | debug | demo | test | hidden
defined('APPHP_MODE') or define('APPHP_MODE', 'debug'); 

$apphp = dirname(__FILE__).'/../../framework/Apphp.php';
$config = APPHP_PATH.'/protected/config/';

require_once($apphp);
A::init($config)->run();