For example, you can enter a page from one o'clock in the morning to two o'clock in the morning, and the rest of the time, in order to knock out: "Now is not the time to visit this page." Thanks in advance.

  • @oOKomarOo, According to the rules of the forum, questions should not be limited to proposals to do the work. - Baran

2 answers 2


if(date('H')=='01'){ //показываем }else{ //прятаем } 


 RewriteCond %{TIME_HOUR} !^01$ RewriteRule ^(.*)$ /close.html [L,QSA] 

    You can try this:

     if(date('H:i') >= '01:00' && date('H:i') < '02:00'){ echo "Заходи, дорогой!"; } else { echo "У нас закрыто!"; } 
    • for a full minute more than the site will be available .. - FLK
    • You are our astute))) date ('H: i') <'02: 00 ' - Deonis