.htaccess - Rule to redirect file based on timestamp? -


i need filter json files based on date , time present on it's name.

if file name datetime.json bigger current time want redirect future.json.

if file name less current time, don't redirect.

for example:

current date , time 1377512625. file name 1345732202. current date , time greater file name, serve 1345732202.json:

http://myserver.com/1345732202.json  

current date , time 1377512625. file name 1408804202. current date , time less file name, serve future.json:

http://myserver.com/1408804202.json 

here .htaccess not work:

rewriteengine on rewritecond %{time} <%{request_filename} [nc] rewriterule ^(.*)\.json$ /future.json [r=307,l] 


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -