【问题标题】:How to set unix time stamp in Apache 2.4 cookie?如何在 Apache 2.4 cookie 中设置 unix 时间戳?
【发布时间】:2022-01-12 22:49:20
【问题描述】:

我正在尝试在 cookie 中设置 Unix 时间戳。 Apache 2.4 中是否有可用的表达式变量来获取它?

类似RewriteRule .* - [CO=time:%{UNIX_TIMESTAMP}:.example.com:0:/]

【问题讨论】:

    标签: apache .htaccess mod-rewrite


    【解决方案1】:

    你可以使用 mod-rewrite %{TIME} 变量

    RewriteRule .* - [CO=time:%{TIME}:.example.com:0:/]
    

    【讨论】:

    • 这只是返回正常的UTC时间戳20211208061427
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-25
    • 2017-05-18
    • 1970-01-01
    • 2017-03-30
    • 2021-05-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多