Need snippet for nginx config file. Original .htaccess:
Options -MultiViews
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
2
Answers
Nginx doesn’t support .htacess file. You can import your .htacess settings to nginx conf file.
You can use .htacess to nginx converter https://winginx.com/en/htaccess.
if wordpress site is inside /var/www/html/web/wordpress then nginx config should be