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
Long MMO
  • 11
  • 2

1 Answers1

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.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63