<IfModule mod_headers.c>
	# YEAR
	<FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf)$">
		Header set Cache-Control "max-age=29030400"
	</FilesMatch>
	# WEEK
	<FilesMatch "\.(js|css|swf)$">
		Header set Cache-Control "max-age=604800"
	</FilesMatch>
	# 45 MIN
	<FilesMatch "\.(html|htm|txt|php)$">
		Header set Cache-Control "max-age=2700"
	</FilesMatch>
</IfModule>

# Removed old mod_gzip section

<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/javascript application/javascript
</IfModule>

# PHP values - only if PHP is running as Apache module
# If using FastCGI, move these to php.ini or .user.ini
<IfModule mod_php5.c>
	php_value upload_max_filesize 64M
    php_value post_max_size 64M
</IfModule>
<IfModule mod_rewrite.c>
	RewriteEngine on
    #RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
    #RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/erp_key_generate_soft/$1 [R=301,L]
    	RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
    
	Options -Indexes +FollowSymLinks -MultiViews
	RewriteRule ^erpcustomeraddedit/([^/]*)$ erp_cust_add.php?id=$1 [L]
	
	
	RewriteRule ^credit_note_print/([^/]*)$ credit_note_print.php?id=$1 [L]
	RewriteRule ^debit_note_print/([^/]*)$ debit_note_print.php?id=$1 [L]
	RewriteRule ^use_dr_note/([^/]*)$ use_dr_note.php?id=$1 [L]
	RewriteRule ^use_cr_note/([^/]*)$ use_cr_note.php?id=$1 [L]
	RewriteRule ^creditnote_edit/([^/]*)$ credit_note_add.php?id=$1 [L]
	RewriteRule ^debitnote_edit/([^/]*)$ debit_note_add.php?id=$1 [L]
	RewriteRule ^debit_note_print/([^/]*)/([0-9]+)$ debit_note_print.php?id=$1&printstatus=$2 [L]
	RewriteRule ^useredit/([^/]*)$ useradd.php?id=$1 [L]
	RewriteRule ^purchaseedit/([^/]*)$ purchase_add.php?id=$1 [L]
	RewriteRule ^sales_order_print/([^/]*)$ sales_order_print.php?id=$1 [L]
	RewriteRule ^salesorderedit/([^/]*)$ sales_order.php?id=$1 [L]
	RewriteRule ^purchasepaymentdirect/([^/]*)$ purchasepayment.php?id=$1 [L]
	RewriteRule ^povenderedit/([^/]*)$ po_vender.php?id=$1 [L]
	RewriteRule ^processordercopy/([^/]*)$ processorderadd.php?id=$1 [L]
	RewriteRule ^directprocessorderedit/([^/]*)$ directprocessorderadd.php?id=$1 [L]
	RewriteRule ^directprocessordercopy/([^/]*)$ directprocessorderadd.php?id=$1 [L]
	
	RewriteRule ^envelopeedit/([^/]*)$ evenlope-design.php?id=$1 [L]
	RewriteRule ^envelopeprint/([^/]*)/([0-9]+)$ envelopeprint.php?&type=$1&id=$2 [L]
	RewriteRule ^print/([^/]*)$ print.php?&type=$1 [L]
	RewriteRule ^receipt/([^/]*)$ receipt.php?&id=$1 [L]
	RewriteRule ^labourprint/([^/]*)/([0-9]+)$ labourprint.php?&type=$1&id=$2 [L]
	
	RewriteRule ^dispath_form/([^/]*)$ dispath_form.php?id=$1 [L]
	RewriteRule ^finacialedit/([^/]*)$ finacial.php?id=$1 [L]
	RewriteRule ^exciseinvoicechalan/([^/]*)$ exciseinvoicechalan.php?id=$1 [L]
	RewriteRule ^ecustomeraddedit/([^/]*)$ ecustomeradd.php?id=$1 [L]
	RewriteRule ^venderaddedit/([^/]*)$ venderadd.php?id=$1 [L]
	RewriteRule ^purchasebilledit/([^/]*)$ purchasebilladd.php?id=$1 [L]
	RewriteRule ^productaddedit/([^/]*)$ productadd.php?id=$1 [L]
	RewriteRule ^invoicepaymentmode/([0-9]+)$ invoicepayment.php?invoiceid=$1 [L]
	RewriteRule ^serviceinvoiceedit/([^/]*)$ serviceinvoice.php?id=$1 [L]
	RewriteRule ^serviceinvoicepaymentmode/([0-9]+)$ serviceinvoicepayment.php?invoiceid=$1 [L]
	RewriteRule ^einvoicepaymentmode/([0-9]+)$ einvoicepayment.php?invoiceid=$1 [L]
	RewriteRule ^setting/([^/]*)$ setting.php?id=$1 [L]
	RewriteRule ^changepassword/([^/]*)$ changepassword.php?id=$1 [L]
	RewriteRule ^income-expense-lesar/([^/]*)$ income-expense-lesar.php?id=$1 [L]
	RewriteRule ^customeraddedit/([^/]*)$ customer.php?id=$1 [L]
	RewriteRule ^proformaedit/([^/]*)$ proforma.php?id=$1 [L]
	RewriteRule ^invoiceedit/([^/]*)$ invoice.php?id=$1 [L]
	RewriteRule ^pinvoiceedit/([^/]*)$ p_invoice.php?id=$1 [L]
	RewriteRule ^poedit/([^/]*)$ po.php?id=$1 [L]
	RewriteRule ^poprint/([^/]*)$ poprint.php?id=$1 [L]
	RewriteRule ^purchase_view/([^/]*)$ purchase_view.php?id=$1 [L]
	RewriteRule ^receipt_purchase/([^/]*)$ receipt_purchase.php?id=$1 [L]
	RewriteRule ^company_pref/([^/]*)$ company_pref.php?id=$1 [L]
	RewriteRule ^poprint/([^/]*)/([0-9]+)$ poprint.php?id=$1&printstatus=$2 [L]
	
	RewriteRule ^poreceipt/([^/]*)$ poreceipt.php?id=$1 [L]
	RewriteRule ^einvoiceedit/([^/]*)$ exsice_invoice.php?id=$1 [L]
	RewriteRule ^exciseinvoicereceipt/([^/]*)$ exciseinvoicereceipt.php?id=$1 [L]
	RewriteRule ^exciseinvoicereceipt/([^/]*)/([0-9]+)$ exciseinvoicereceipt.php?id=$1&printstatus=$2 [L]
	RewriteRule ^invoicereceipt/([^/]*)/([0-9]+)$ invoicereceipt.php?id=$1&printstatus=$2 [L]
	RewriteRule ^invoicereceipt/([^/]*)$ invoicereceipt.php?id=$1 [L]
	RewriteRule ^proformareceipt/([^/]*)/([0-9]+)$ proformareceipt.php?id=$1&printstatus=$2 [L]
	RewriteRule ^proformareceipt/([^/]*)$ proformareceipt.php?id=$1 [L]
	RewriteRule ^invoicereceipt1/([^/]*)$ invoicereceipt1.php?id=$1 [L]
	RewriteRule ^pinvoicereceipt/([^/]*)/([0-9]+)$ p_invoicereceipt.php?id=$1&printstatus=$2 [L]
	RewriteRule ^pinvoicereceipt/([^/]*)$ p_invoicereceipt.php?id=$1 [L]
	RewriteRule ^invoice_numberserise/([^/]*)$ invoice_numberserise.php?id=$1 [L]

	RewriteRule ^companyedit/([^/]*)$ create_company.php?id=$1 [L]
	RewriteRule ^estimateedit/([^/]*)$ estimate.php?id=$1 [L]
	RewriteRule ^inwardedit/([^/]*)$ inward.php?id=$1 [L]
	RewriteRule ^inwardprint/([^/]*)$ inwardprint.php?id=$1 [L]
	RewriteRule ^estimateprint/([^/]*)$ estimateprint.php?id=$1 [L]
	RewriteRule ^estimateprint/([^/]*)/([0-9]+)$ estimateprint.php?id=$1&printstatus=$2 [L]
	RewriteRule ^inwardprint/([^/]*)/([0-9]+)$ inwardprint.php?id=$1&printstatus=$2 [L]

	RewriteRule ^invoicechalan/([^/]*)$ invoicechalan.php?id=$1 [L]
	RewriteRule ^serviceinvoicereceipt/([^/]*)$ serviceinvoicereceipt.php?id=$1 [L]
	RewriteRule ^serviceinvoicereceipt/([^/]*)/([0-9]+)$ serviceinvoicereceipt.php?id=$1&printstatus=$2 [L]
	RewriteRule ^serviceinvoicechalan/([^/]*)$ serviceinvoicechalan.php?id=$1 [L]
	RewriteRule ^backup/([^/]*)$ backup.php?flag=$1 [L]
	RewriteRule ^truncate/([^/]*)$ truncate.php?flag=$1 [L]
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteCond %{REQUEST_FILENAME}\.php -f
	RewriteRule ^(.*)$ $1.php
</ifModule>

                            