DirectoryIndex index.php

<IfModule mod_rewrite.c>
	RewriteEngine On

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},C]
    #redirect to the given service if request file name is not a directory or a file existing on the project files
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^user(.*)$ /router.php [QSA,L]
	RewriteRule ^settings(.*)$ /router.php [QSA,L]
	RewriteRule ^ethernet(.*)$ /router.php [QSA,L]
	RewriteRule ^module(.*)$ /router.php [QSA,L]
	RewriteRule ^switch(.*)$ /router.php [QSA,L]
	RewriteRule ^email(.*)$ /router.php [QSA,L]
	RewriteRule ^sms(.*)$ /router.php [QSA,L]
	RewriteRule ^snmp(.*)$ /router.php [QSA,L]
    RewriteRule ^server(.*)$ /router.php [QSA,L]
	RewriteRule ^ws(.*)$ /router.php [QSA,L]
	RewriteRule ^tests(.*)$ /router.php [QSA,L]
	RewriteRule ^acquisitions(.*)$ /router.php [QSA,L]
	RewriteRule ^acquisitions/ufom(.*)$ /router.php [QSA,L]
	RewriteRule ^messages(.*)$ /router.php [QSA,L]
	RewriteRule ^alarms(.*)$ /router.php [QSA,L]
	RewriteRule ^activity(.*)$ /router.php [QSA,L]
	RewriteRule ^autotest(.*)$ /router.php [QSA,L]
	RewriteRule ^maintenance(.*)$ /router.php [QSA,L]
	RewriteRule ^option(.*)$ /router.php [QSA,L]
	RewriteRule ^api/ports(.*)$ /router.php [QSA,L]
	RewriteRule ^api/otu(.*)$ /router.php [QSA,L]
	RewriteRule ^api/url(.*)$ /router.php [QSA,L]
	RewriteRule ^uploadvpn(.*)$ /app/util/upload/SMTUploadVpn.php [QSA,L]
	RewriteRule ^uploadrelease(.*)$ /app/util/upload/SMTUploadRelease.php [QSA,L]
	RewriteRule ^uploadbackup(.*)$ /app/util/upload/SMTUploadBackup.php [QSA,L]
	RewriteRule ^uploadpatch(.*)$ /app/util/upload/SMTUploadPatch.php [QSA,L]
	RewriteRule ^uploadkml(.*)$ /app/util/upload/SMTUploadKml.php [QSA,L]
	RewriteRule ^uploadlicense(.*)$ /app/util/upload/SMTUploadLicense.php [QSA,L]
	RewriteRule ^uploadsslcertificate(.*)$ /app/util/upload/SMTUploadSslCertificate.php [QSA,L]
		
	#redirect to index.php if request was not handled before and if file requested is not js, png, gif, html, pdf, php or css files
	#fixed in Apache 2.2.31 and incompatible with https: Force prefix http://%{HTTP_HOST} to workaroud a bug in mod_rewrite in Apache with IpV6: https://issues.apache.org/bugzilla/show_bug.cgi?id=52831
	RewriteCond %{REQUEST_FILENAME} !^(.+).js$
	RewriteCond %{REQUEST_FILENAME} !^(.+).png$
    RewriteCond %{REQUEST_FILENAME} !^(.+).ico$
	RewriteCond %{REQUEST_FILENAME} !^(.+).pdf$
	RewriteCond %{REQUEST_FILENAME} !^(.+).gif$
	RewriteCond %{REQUEST_FILENAME} !^(.+).html$
	RewriteCond %{REQUEST_FILENAME} !^(.+).php$
	RewriteCond %{REQUEST_FILENAME} !^(.+).css$
	RewriteCond %{REQUEST_FILENAME} !^(.+).yaml$
	RewriteRule ^(.*)$ /index.php [R,NC,L]
	#RewriteRule ^(.*)$ http://%{HTTP_HOST}/index.php [R,NC,L]   
	
	#redirect to index.php if file requested doesn't exist
	#fixed in Apache 2.2.31 and incompatible with https: Force prefix http://%{HTTP_HOST} to workaroud a bug in mod_rewrite in Apache with IpV6: https://issues.apache.org/bugzilla/show_bug.cgi?id=52831
	RewriteCond %{REQUEST_FILENAME} !-f	
	RewriteRule ^(.*)$ /index.php [R,NC,L]
	#RewriteRule ^(.*)$ http://%{HTTP_HOST}/index.php [R,NC,L]
	
</IfModule>
<IfModule mod_php5.c>
	#php_flag display_errors On
</IfModule>
