Forum OpenACS Development: RFC: Adding support for URLs without query variables to the request processor

AolServer supports the URL syntax as described in RFC 3896. There is a need to support a URL format that doesn't have special characters like the question mark and ampersand.

What is being proposed?

We want to support moving URL query variables to the path portion of the URL. This will allow OpenACS to accept and generate URLs of the format equivalent to

To do this, we may need to register a new filter and/or modify rp_filter. Also, all ns_conn calls need to be changed to ad_conn, hardcoded URLs replaced with calls to export_vars, calls like '[ad_conn url]?[ad_conn query]' replaced with '[ad_return_url]'.


Many search engine spiders ignore dynamic pages with URLs containing special symbols like question mark and ampersand. This modification will remove or lessen this limitation.
Already some packages implement an index.vuh page to support pretty urls and this would remove the requirment of special code for building pretty urls.


Currently, there are about 500 lines that use ns_conn from about 4 dozen packages that need to be changed. Also, we need to change hardcoded URLs from adp and tcl files to calls to export_vars.

How will it work?

If this URL format is turned on, standard URL queries will also be supported. The filter will only extract data from one format or the other on each request. If the /params/ format is detected no query variables after a ? will be processed, and they will be removed the from form query ns_set. All parameters in the correct format will be
added to the form ns_set so normal processing of the query variables can occur. By doing this ad_page_contract will still work.

Procedures such as ad_return_url, export_vars will be changed to return query variables in the new format.

Other places that would need to be changed include ad_conn urlv etc to differeniate between the URL and the query.


I neglected to mention that this will be implemented as an optional feature with a parameter in acs-kernel. All the affected Tcl procedures will check this parameter. Also the filter will only be loaded if the parameter on.

This has been discussed at length in these Forums several times before. In particular, this has already been implemented at least once, by Don Baccus for Greenpeace, which he talked about in May and Sept. 2003. Some threads also touching on this subject include these from Sept. 2002, May 2003, Feb. 2004, and March 2004. I think there were others though - a more complete list of references could be useful.

Could the switch work more like how the acs-subsite parameter RestrictToSSL works, where the value is a space separated list of base urls using this feature?