Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

pretty URLs

#300

It seems like pretty URLs are redirected to non-pretty URLs. For example, http://zenadmin.org/en/zafu/forms/captcha gets redirected to http://zenadmin.org/en/zafu/ztag396.html.

Shouldn't it be the opposite?

Reported by David Lee · July 15th, 2010 @ 10:54 AM

State: open
Milestone: 1.5
Assigned to: Gaspard Bucher Gaspard Bucher

Activity

  1. Gaspard Bucher
    Gaspard Bucher
    • Milestone set to 1.5
    • State changed from new to open
    • Tag set to apache, enhancement, nginx, url
    • Milestone order changed from 4 to 0

    Yes and no.

    We need to solve this issue in a way that if the page title changes (or a parent page), old links pointing to the page will still work. There are tons of blog posts on the internet that just point to 404 errors because the author changed the title or moved the article.

    This is why pretty urls are not really encouraged in Zena until we find a good fix to this problem. I see two solutions that could work better then the current implementation.

    1. keep a list of mappings "url" --> zena node (there is another ticket related to this subject #296 support custom urls with mod_rewrite and mod_dbd that deals with more then one url pointing to the same page)
    2. keep the node id in the url

    For "url safety" (avoid 404 errors) I prefer the second solution. Maybe we could have something like this:

    Default url: "/en/zafu/forms/396-captcha" (if you rename "forms" to "input", we can redirect because of the node id).
    Alias urls: "/anything/that/you/want" --> "/en/zafu/forms/396-captcha" (these must not be changed or the client will get 404).

    In order to keep performance at a good level, the urls need to be cached and stored in an "urls" table that could (ideally) be accessed by Apache/nginx during Url rewrite (so that Zena only sees one url and can cache response).

    July 15th, 2010 @ 02:45 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.