RewriteEngine On
# RewriteCond %{HTTPS} off
# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


# Look for a root file before the rewriting the HTML file

RewriteCond %{REQUEST_URI} !(^/aaaaaaaaaaaaaaaaaaaaaaaa$) [NC]

       

# other exclusions

RewriteCond %{REQUEST_URI} !(^.+\.css$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.dir$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.ico$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.gif$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.jpg$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.png$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.doc$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.docx$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.xls$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.pdf$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.swf$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.txt$) [NC]

#RewriteCond %{REQUEST_URI} !(^.+\.htm$) [NC]

#RewriteCond %{REQUEST_URI} !(^.+\.html$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.xml$) [NC]

#RewriteCond %{REQUEST_URI} !(^.+\.php$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.js$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.eot$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.svg$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.ttf$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.woff$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.woff2$) [NC]

RewriteCond %{REQUEST_URI} !(^.+\.msg$) [NC]

RewriteCond %{REQUEST_URI} !(phpinfo.php)

RewriteCond %{REQUEST_URI} !(^/phpmyadmin/)



RewriteCond %{REQUEST_URI} !(adminpanel)

RewriteCond %{REQUEST_URI} !(^/newtemplates/)

RewriteCond %{REQUEST_URI} !(^/phpdoc/)

RewriteCond %{REQUEST_URI} !(^/pdfreports/)



RewriteCond %{REQUEST_URI} !(dashboard.php|getID.php|sample_page.php|test_sample.php|forgot_password.php|file_download.php|test.php|db_backup_cron.inc.php|js_localize.php|browse.php|ajax.php|css.php|index.php) [NC]



RewriteRule ^.*$ admin_pahli.inc.php [L]

RewriteRule ^.*\.(rb|py|exe|tar|zip)$ - [F,L,NC] 

RewriteRule ^(events_docucments|image_gallery_product|excel_updates|css|image_gallery|images|logo|pgimages|portfolio_feature_img|product_images|UserFiles)/.*\.(php|html|htm|js|rb|py|exe|tar|zip)$ - [F,L,NC] 

RewriteRule ^(js|scripts|)/.*\.(php|rb|py|tar|zip)$ - [F,L,NC]