1
RewriteCond %{TIME_SEC} >40
RewriteCond %{TIME_SEC} <56
RewriteRule ^(.*)the-product(.*)$ https://www.%{HTTP_HOST}/%{REQUEST_URI} [R=301,L]

I want to convert it to nginx but there is no solution for it to run for a fixed time

RewriteCond %{TIME_SEC} >40
RewriteCond %{TIME_SEC} <56

1 Answer 1

1

nginx does not support such functionality in such direct way than Apache2.

Specifically, nginx has no variable for "seconds", and it has no integer comparisons.

You need to look into nginx njs module, which can be used to serve certain endpoints by JavaScript code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .