Ticket #68 (closed enhancement: fixed)

Opened 1 year ago

Last modified 9 months ago

Allow pretty URLs

Reported by: schst Assigned to: nsteiner
Priority: major Milestone: 0.3.0
Component: MVC Version: SVN-trunk
Keywords: Cc:

Description (Last modified by schst)

The MVC component should provide an easy way to make use of pretty URLS, for example like the Zend Framework does.

I could image URLs like:

http://localhost/processor/page;session/param1/value1/param2/value2

This feature is a requirement for tickets #60 and #53.

Change History

06/10/07 11:34:55 changed by schst

  • summary changed from Allow pretty URLST to Allow pretty URLs.

07/02/07 10:50:08 changed by mikey

  • milestone set to 0.3.0.

08/16/07 17:03:00 changed by mikey

  • status changed from new to assigned.

08/19/07 16:31:08 changed by schst

  • description changed.

(follow-up: ↓ 6 ) 08/20/07 17:58:01 changed by mikey

  • owner changed from mikey to nsteiner.
  • status changed from assigned to new.

URLs for XML processor will be http://localhost/xml/[PAGE];psessionid=[SESSION_ID]?param1=value1&param2=value2

There will be no rewriting of parameters because they will be dependend of the application and it is hard to impossible to generate a general rewrite rule for them.

Content of the .htaccess file for rewriting URLs as above:

RewriteEngine on
RewriteRule xml(/([a-zA-Z0-9_\-\.]*)?)?(;psessionid=([a-zA-Z0-9]{1,32}))?$ index.php?processor=xml&page=$2&PHPSESSID=$4&%{QUERY_STRING} [L]

URLs for other processors can be created similarly.

Still to be done: XSL-Template stub:link needs to be modified to create URLs like the scheme above.

(in reply to: ↑ 5 ) 08/21/07 13:55:50 changed by mikey

Session parameter name should be the same both in seen and rewritten URL.

Content of the .htaccess file for rewriting URLs as above:

RewriteEngine on
RewriteRule xml(/([a-zA-Z0-9_\-\.]*)?)?(;(psessionid)=([a-zA-Z0-9]{1,32}))?$ index.php?processor=xml&page=$2&$4=$5&%{QUERY_STRING} [L]

This way the name of the session id parameter can be configured and easily created within the build process.

08/21/07 16:44:29 changed by mikey

  • status changed from new to closed.
  • resolution set to fixed.

Fixed with changesets 850, 857, 858 and 859. Responsibility to create pretty URLs is up to the processor of the selected view engine. Currently only the XML/XSL view engine supports pretty URLs.