RewriteEngine on
AddType application/x-httpd-php-source .phps

RewriteCond %{REQUEST_URI} !(^/aaaaaaaaaaaaaaaaaaaaaaaa$) [NC]
 
 
      
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} !(^.+\.txt$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.png$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.doc$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.xls$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.pdf$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.swf$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.xml$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.js$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.ttf$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.woff$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.svg$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.eot$) [NC]
RewriteCond %{REQUEST_URI} !(^.+\.otf$) [NC]
RewriteCond %{REQUEST_URI} !(phpinfo.php)
RewriteCond %{REQUEST_URI} !(^/phpmyadmin/)

RewriteCond %{REQUEST_URI} !(admin)

RewriteCond %{REQUEST_URI} !(livehelp)

RewriteCond %{REQUEST_URI} !^/livehelp/

RewriteCond %{REQUEST_URI} !(^/admin/)
RewriteCond %{REQUEST_URI} !(^/mobile/)
RewriteCond %{REQUEST_URI} !(^/blog/)
RewriteCond %{REQUEST_URI} !(^/newtemplates/)
RewriteCond %{REQUEST_URI} !(^/phpdoc/)



# exclude some files from security check
RewriteCond %{REQUEST_URI} !(invoice/invoice.php|donate_now.inc.php|template_document.php|document_invoice.php|index.php|register.php|forgot_password.php|after_registration.php|bought_it_email_form.php|confirm_email.php|job_sheet_pdf.php|pdf_send_to_lender.php|quotation_template.php|instruction_to_proceed.php|retainer_agreement.php|client_care_letter.php|complaints_procedure.php|regenrating_pdf.php|user_auto_complete_search.inc.php|supplier_auto_complete_search.inc.php|admin_auto_complete_search.php|ajax_actions.php|captcha/random_image_sample.php|googlebase.php) [NC]
RewriteCond %{REQUEST_URI} !(slide/index.html) [NC]

RewriteRule ^.*$ pahli.php [L]

RewriteRule ^.*\.(doc|docx|rb|py|exe|tar|zip)$ - [F,L,NC] 
RewriteRule ^(invoice/pdf/images|css|css_foundation|images_foundation|img|gallerylib|fonts|fonts_foundation|banner|UserFiles|student_documents|product_images|pgimages|logo|images|inner_banner)/.*\.(txt|doc|docx|php|html|htm|js|rb|py|exe|tar|zip|asp)$ - [F,L,NC] 
RewriteRule ^(js|scripts|)/.*\.(txt|doc|docx|php|rb|py|tar|zip|asp)$ - [F,L,NC]