D
D
doutaxe2020-01-17 23:06:24
Nginx
doutaxe, 2020-01-17 23:06:24

How to convert rules from .htaccess to nginx config?

Hello! Moved from apache to nginx+php-fpm, having difficulty transferring one of the redirects from .htaccess.
There is a bunch of redirects like:

RewriteRule ^catalog/(.*)-(.*)/2018/.*/$ https://example.ru/$1/$2/ [R=301,L]
RewriteRule ^catalog/(.*)-(.*)/2019/.*/$ https://example.ru/$1/$2/ [R=301,L]

What gives https://winginx.com/en/htaccess - puts the whole folder /catalog/ by 404 :(
I don't know how it works :(

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question