Remove index.php from imported urls
Solved thanks to https://stackoverflow.com/questions/27907044/htaccess-rule-to-remove-index-php-from-the-end-of-my-urls

Modified part of Drupal's .htaccess. Important to add new rule before standard index rewrite:

# Remove trailing /index.php that comes from external links.
RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^(.*?)index\.php$ /$1 [L,R=302,NC,NE]

# Pass all requests not referring directly to files in the filesystem to
# index.php.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]