Link | encode_urlpath |
Author | Jason Huck |
Category | Encoding |
Version | 8.x |
License | http://opensource.org/licenses/artistic-license.php |
Posted | 03 Mar 2006 |
Updated | 22 Mar 2006 |
More by this author... |
This tag is part of a workaround for a security measure in Apache that complains about URL path components that contain URL-encoded slashes. Can be decoded using [decode_urlpath].
This tag is designed to be used with the [define_atbegin] method of URL rewriting. Since the regular expression commonly used in the <LocationMatch> directive with that method only passes virtual paths that do not contain periods, periods are also encoded. The tag also converts spaces to underscores for improved readability.
encode_urlpath($string);
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag( 'urlpath', -namespace='encode_', -required='in', -priority='replace', -description='Makes a string safe to use as a URL path component with Apache.' ); local('out') = #in; #out->replace(' ','_')&replace('/','-!')&replace('\'','`'); #out = encode_stricturl(#out); #out->replace('.','.')&replace('%5c','\'); return(@#out); /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft