I've installed a script in a sub folder which relies on .htaccess rewrite rules - if you visit the script once install properly it redirects you a /login page which actually doesn't exist on the server. However this is all on Apache. I want to know how to convert the below .htaccess rules to nginx but also not affect our website in the root directory.
The .htaccess reads…
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
The script is in a sub folder
/clp2/
So I assume if I make any redirect location rules it would need to specify the subfolder? As this .htaccess file is obviously folder specific and not web specific.
The full server path to the script is
/var/www/vhosts/i-16852366/clp2
Any input welcome, I assume this is quite easy if you know what you're doing - I tried an nginx re-writer but its not working and its obviously not being specific to the folder I need it doing the rewrite rule on, so I need some guidance there too.