Manual: Archive 404 #69466

Closed
opened 2019-09-04 00:41:05 +02:00 by Tobias Heinke · 6 comments
Member

The server redirect to the fallback on 404 and not to the 404 page within the archive.

example: https://docs.blender.org/manual/en/2.80/interface/splsh.html
404: https://docs.blender.org/manual/en/2.80/404.html

The server redirect to the fallback on 404 and not to the 404 page within the archive. example: https://docs.blender.org/manual/en/2.80/interface/splsh.html 404: https://docs.blender.org/manual/en/2.80/404.html
Author
Member

Added subscriber: @Tobias

Added subscriber: @Tobias
Member

Added subscriber: @dmcgrath

Added subscriber: @dmcgrath
Member

It would appear that we cannot use ErrorDocument Apache directives in a <Location> context. To manually do this, we could have to define a hard-coded path for each language and version combination. Clearly this doesn't work well over time!

As an alternative, I suggest that we use .htaccess files. I enabled the FileInfo override for this path in Apache, so you should be able to drop an .htaccess file in the document root for each language with the line:

  • ErrorDocument 404 /manual///404.html

Where <lang> and <version> are replaced accordingly.

Part of the problem with custom error documents is that we also share a virtual host with the Python API, so it quickly becomes a problem to use a generic 404.html page. No doubt, it would confuse a user accessing a non-existent PyDoc URL, only to have an English 404 page show up. Also, what about other languages?

On a side note, Apache does have the ability to display MultiViews . Perhaps this could be useful?

It would appear that we cannot use `ErrorDocument` Apache directives in a `<Location>` context. To manually do this, we could have to define a hard-coded path for each language and version combination. Clearly this doesn't work well over time! As an alternative, I suggest that we use `.htaccess` files. I enabled the `FileInfo` override for this path in Apache, so you should be able to drop an `.htaccess` file in the document root for each language with the line: - ErrorDocument 404 /manual/**<lang>**/**<version>**/404.html Where `<lang>` and `<version>` are replaced accordingly. Part of the problem with custom error documents is that we also share a virtual host with the Python API, so it quickly becomes a problem to use a generic `404.html` page. No doubt, it would confuse a user accessing a non-existent PyDoc URL, only to have an English 404 page show up. Also, what about other languages? On a side note, Apache does have the ability to display [MultiViews ](http://httpd.apache.org/docs/current/content-negotiation.html). Perhaps this could be useful?
Author
Member

I don't know anything about Apache.

Every language has it's own page, e.g. https://docs.blender.org/manual/fr/2.80/404.html

I don't know anything about Apache. Every language has it's own page, e.g. https://docs.blender.org/manual/fr/2.80/404.html
Member

Create a file called .htaccess in the top directory of the output html files for the language with the contents:

  • ErrorDocument 404 /manual///404.html
Create a file called `.htaccess` in the top directory of the output html files for the language with the contents: - ErrorDocument 404 /manual/<lang>/<version>/404.html
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Aaron Carlisle self-assigned this 2020-01-25 20:36:41 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-manual#69466
No description provided.