htaccess将在网址末尾添加时间戳
RewriteCond %{QUERY_STRING} ^$
RewriteRule . %{REQUEST_URI}?%{TIME} [L,R=302,NE]
现在网址是
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]
答案 0 :(得分:0)
你想:
RewriteCond %{QUERY_STRING} ^$
RewriteRule . %{REQUEST_URI}?%{TIME_YEAR}%{TIME_MONTH}%{TIME_DAY} [L,R=302,NE]