.htaccess 如何添加日期查询而不是时间

.htaccess 如何添加日期查询而不是时间,.htaccess,.htaccess,将在url末尾添加时间戳的htaccess RewriteCond %{QUERY_STRING} ^$ RewriteRule . %{REQUEST_URI}?%{TIME} [L,R=302,NE] 现在url是 http://example.com/page1.html?20150219190231 (year,month date - hour - minutes - seconds) 我喜欢url就是这样 http://example.com/page1.html?201

将在url末尾添加时间戳的htaccess

RewriteCond %{QUERY_STRING} ^$
RewriteRule . %{REQUEST_URI}?%{TIME} [L,R=302,NE]
现在url是

http://example.com/page1.html?20150219190231    
(year,month date - hour - minutes - seconds)
我喜欢url就是这样

http://example.com/page1.html?20150219
(Year , month ,date)
我尝试添加?%{Date}但这不起作用

RewriteCond %{QUERY_STRING} ^$
RewriteRule . %{REQUEST_URI}?%{TIME} [L,R=302,NE] 
你想要:

RewriteCond %{QUERY_STRING} ^$
RewriteRule . %{REQUEST_URI}?%{TIME_YEAR}%{TIME_MONTH}%{TIME_DAY} [L,R=302,NE] 

您不能只编写自己的
%
变量。这里有一个可用的列表:你必须在每年的时间、周一的时间等制定自己的计划。。。