June 05, 2020
On 2020-06-03 15:25, Seb wrote:

> Yeah, I fully agree that DIP links breaking when their status changes is a really big problem. I also wrote to Mike about this a while ago.
> 
> I guess the easiest/quickest option is to add redirects to dlang.org.
> This can be done by adding "Redirect 301 /dips/1028 https://github.com/.../"
> 
> https://github.com/dlang/dlang.org/blob/master/.htaccess
> 
> However, I think this will require quite a bit of manual maintenance and is easy to forget, so the best option is to render the Markdown into HTML automatically at the DIPs repository, which can then continuously be deployed to e.g. dips.dlang.org

An alternative would be, for a URL like this:

https://dips.dlang.org/1234

Extract everything after the slash, "1234" in this case, and check a list of URLs to redirect to:

https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP1234.md
https://wiki.dlang.org/DIP1234
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1234.md
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1234.md
... and so on

Redirect to the first one that exists. I don't know if that's possible to do directly in Apache, or if an additonal server side process is required to handle this.

I remember we did something similar at work for server side caching of web pages. But that checked a local file instead of another URL. That was purely done inside Apache.

-- 
/Jacob Carlborg
June 05, 2020
On Friday, 5 June 2020 at 06:53:13 UTC, Jacob Carlborg wrote:
> On 2020-06-03 15:25, Seb wrote:
>
>> [...]
>
> An alternative would be, for a URL like this:
>
> https://dips.dlang.org/1234
>
> Extract everything after the slash, "1234" in this case, and check a list of URLs to redirect to:
>
> https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP1234.md
> https://wiki.dlang.org/DIP1234
> https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1234.md
> https://github.com/dlang/DIPs/blob/master/DIPs/DIP1234.md
> ... and so on
>
> Redirect to the first one that exists. I don't know if that's possible to do directly in Apache, or if an additonal server side process is required to handle this.
>
> I remember we did something similar at work for server side caching of web pages. But that checked a local file instead of another URL. That was purely done inside Apache.

It's already done: https://github.com/dlang/dlang.org/pull/2811

For example:
https://dlang.org/dips/1
https://dlang.org/dips/75
https://dlang.org/dips/1018

;)

P.S. Thanks, Dennis!
June 05, 2020
On 2020-06-05 12:55, Petar Kirov [ZombineDev] wrote:

> It's already done: https://github.com/dlang/dlang.org/pull/2811

Hmm, I see. I tried to come up with a solution that didn't require manual work to keep the list up to date.

I see that all the old ones are redirected to the wiki, although there are a couple of ones on GitHub in the "archived" directory.

-- 
/Jacob Carlborg
1 2
Next ›   Last »