Options -MultiViews -Indexes RewriteEngine On # ms-teams-bot route isn't handled by laravel RewriteRule ^api/messages.* - [L] # SCIM route isn't handled by laravel RewriteRule ^api/scim.* - [L] # ServiceNow integration isn't handled by laravel RewriteRule ^snow/response.* - [L] # Ignore requests for public dirs that contain only static assets. RewriteRule ^api/?$ - [L] RewriteRule ^content/?$ - [L] RewriteRule ^css/?$ - [L] RewriteRule ^img/?$ - [L] RewriteRule ^js/?$ - [L] RewriteRule ^presentation/?$ - [L] RewriteRule ^web_console/?$ - [L] # TODO: remove this once we rename the dir to /console? # Return 404 if original request is: # /foo/bar.php # /foo/bar.php/ # /foo/bar.php? # This is necessary to hide the fact that we are using # PHP from security scanners that flag PHP as a # potential security risk. RewriteRule ^dashboard\.php$ - [L] RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[?/ ].*$" RewriteRule .* - [L,R=404] # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Redirect old URLs Redirect 301 /login/sd_reporting /login/session_report Redirect 301 /login/pd_reporting /login/presentation_report Redirect 301 /login/api_configuration /login/api_account RewriteCond %{QUERY_STRING} ^choose=Licenses&?(.*)$ RewriteRule ^login/reporting$ /login/license_reporting?%1 [L,R=301] # Handle Front Controller... # RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]