# BEGIN
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

#RewriteCond %{HTTPS} !=on
## This checks to make sure the connection is not already HTTPS
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

RewriteCond %{REQUEST_URI} ^/($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/index.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/calendar($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/calendar.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/archive($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/archive.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/(.*)-(.*)-(.*)-report($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_%2_%3_report.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/(.*)-(.*)-report($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_%2_report.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/(.*)-report($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_report.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/(.*)-report-test($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_report_test.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/(.*)-payments($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_payments.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/(.*)-payments-test($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%1_payments_test.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/logout($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/logout.pl [NC,L]

RewriteCond %{REQUEST_URI} ^/(list|add|edit|delete|copy|search|filter)-(.*)-(.*)-(.*)($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%2_%3_%4.pl?%1 [NC,L]

RewriteCond %{REQUEST_URI} ^/(list|add|edit|view|delete|copy|search|filter|detailed|summary)-(.*)-(.*)($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%2_%3.pl?%1 [NC,L]

RewriteCond %{REQUEST_URI} ^/(list|add|edit|view|delete|copy|search|filter|accepted|pending|closed|stock|purchased|demo|active|all|main|other|vpu|rental|casual|assign|open|active)-(.*)($|/)
RewriteRule ^.*$ /cgi-bin/DEV/aisa/%2.pl?%1 [NC,L]

</IfModule>
# END

