Hallo Community,
ich versuche eine htaccess die in einem Verzeichnis liegt auf nginx zu übertragen. Leider erfolglos. Das ist die .htaccess die unter apache2 tadellos funktioniert:
# Any -js and .php file will redirect to index.php and end rewriting
RewriteRule .*\.js$ index.php [L]
RewriteRule .*\.php$ index.php [L]
# if no file is addressed, redirect to index.php and end rewriting
RewriteRule !(.+) index.php [L]
# Any other named file will rewrite to contao directory
RewriteRule (.+) /root/first/$1 [L]
Dies hab ich für nginx versucht:
location ^~ /spec {
rewrite /.*\.js$ /;
rewrite /.*\.php$ /;
rewrite /!(.+) /;
rewrite /(.+) /root/first/$1 last;
}
Vielleicht hat jemand eine Idee. Danke im Voraus!
Allen einen schönen Abend!