EasyRPG / EV0002

Channel bot in #easyrpg on Libera Chat using the cinch framework
ISC License
4 stars 1 forks source link

Add the year to the :log output when it is not the current year #14

Closed Ghabry closed 5 years ago

Ghabry commented 5 years ago

Have to admit I didn't tested this but there isn't much that can go wrong here.

carstene1ns commented 5 years ago

Sorry for neglecting this so long, but when you opened it , I wanted to solve the initial problem with a redirect rule instead. This makes the URLs more pretty and will also solve the problem when you want to go to another subfolder when the year changes (i.e. 2018/2018-12-31.html2019/2019-01-01.html).

RewriteRule ^log/([0-9]+)/([0-9]+)/([0-9]+)/?$ log/$1/$1-$2-$3.html [QSA,L]
RewriteRule ^log/[0-9]+/([0-9]+/)?([0-9]+/)?([0-9]+)-([0-9]+)-([0-9]+).html$ log/$3/$4/$5/ [QSA,L,R=301]

Keeping this open, because EV0002 needs to be adapted to that.