.htaccess Environments not working -


i've started work .htaccess , can't environments (i think that's how called) work. have this:

rewriteengine on rewritecond %{time_hour}%{time_min} >0600        rewritecond %{time_hour}%{time_min} <1800        rewriterule ^page\.html$ default.html [l]       rewriterule ^page\.html$ defaultnight.html [l] 

i'm not sure what's problem. code have in .htaccess file. have make separate directory of default.html , defaultnight.html? have no idea.

your rewrite conditions don't right. can have rules this:

rewriteengine on  # serve default.html between 8am 6pm rewritecond %{time_hour} >07    rewritecond %{time_hour} <19        rewriterule ^page\.html$ default.html [l]        rewriterule ^page\.html$ defaultnight.html [l] 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -