bgarrels / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

Front-side routing structure #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current front-side routing code is rather opaque and does not cover all 
permutations of URL mode, context and other params.

To get this straight we will align along these guidelines:

#1/ For all request parameters which indicate a route to a member of
*closed* set, we throw a 404 status upon the occurrence of a request
which cannot be served from our set. This is true for article ids,
section names, invalid contexts, fixed routes like /rss/ or /file_download/ et 
cetera.

#2/ We serve content-less responses for non-satisfiable routes calling
members of an *open* set (e.g. categories with zero items, ?q= search
term not found).

#3/ We silently ignore parameters we do not know how to handle (for
instance, to let plugins handle things as
http://example.com/?acb_plugin_var=foobar)

#4/ We apply defaults. "default" is the default section, "article" is
the default context, search is off, and so on.

If no context is specified in the request URL, we use the routing
logic in publish.php to establish one and default to "article" *if* it
is clear from the rest of the request (e.g. through the presence of
$id, $section or the components in the rest of the URL).

See http://forum.textpattern.com/viewtopic.php?pid=263140#p263140 for a sample 
issue.

Original issue reported on code.google.com by r.wetzlmayr on 15 Jul 2012 at 9:59

GoogleCodeExporter commented 9 years ago

Original comment by r.wetzlmayr on 16 Jul 2012 at 5:39

GoogleCodeExporter commented 9 years ago

Original comment by r.wetzlmayr on 25 Jul 2012 at 5:47

GoogleCodeExporter commented 9 years ago
See r4007, r4009.

Original comment by r.wetzlmayr on 25 Jul 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Closing for now. Might revisit later.

Original comment by r.wetzlmayr on 1 Aug 2012 at 6:20