PHP Classes

Smart URI: Wrap all site requests around a single PHP script

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 61%Total: 1,927 All time: 2,046 This week: 673Up
Version License Categories
smart_uri 1.0FreewareHTTP, Content management
Description 

Author

This class can be used to wrap the service of the requests to all pages of a site using a single PHP script.

It takes as argument an array that defines the mapping patterns of request URI to wrapper scripts that should be executed within a safe container when the given URI patterns are matched.

If a wrapper script sets an error variable, the generates a 403 forbidden access HTTP error page.

Request URIs that do not match any pattern make the class generate a 404 not found HTTP error page.

The content outputted by the wrapper script is buffered by the class. It can optionally be served in a compressed format.

Picture of Gregory
Name: Gregory <contact>
Classes: 9 packages by
Country: Russian Federation Russian Federation
Age: 48
All time rank: 1225 in Russian Federation Russian Federation
Week rank: 195 Down9 in Russian Federation Russian Federation Down
Innovation award
Innovation award
Nominee: 1x

Details

SmartURI v0.9.1 (c) Gregory A. Rozanoff, 2004, 2005 ================================================================ "#" - INDEX (root) element. Defines URI like / "*" - INNER element/ Defines all inner pages except INDEX (ex. /inner/instance) "name" - SUB-INDEX element/ Defines all pages like /name/instance The following example describes URIs: http://myhost/ http://myhost/test/ http://myhost/test/any/other/page ---------------------------------------------------------------- $site = array( "#" => "index", ~~~~~ --> Wrapper name /path/to/actions/index.php will be called as a wrapper for http://myhost/ page. "test" => array ( "#" => "index_test", "*" => "index_test", ), ); ---------------------------------------------------------------- URIs like http://myhost/any/page will produce 404 error :) If wrapper not found it poduce a 403 "forbidden" error; URI structure array accessable from wrapper via $_URI variable; If wrapper sets the $_ERROR vatiable into TRUE, it will produce a 403 "Forbidden" error. ================================================================

  Files folder image Files (5)  
File Role Description
Files folder imageactions (1 file)
Files folder imagelib (1 file)
Accessible without login Plain text file .htaccess Data .htaccess example
Accessible without login Plain text file index.php Example index.php
Accessible without login Plain text file readme.txt Doc. micro howto

  Files folder image Files (5)  /  actions  
File Role Description
  Accessible without login Plain text file index_test.php Example index_test.php

  Files folder image Files (5)  /  lib  
File Role Description
  Plain text file class.driver.inc Class class.driver.inc

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,927
This week:0
All time:2,046
This week:673Up
User Ratings User Comments (1)
 All time
Utility:75%StarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:75%StarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:61%StarStarStarStar
Rank:998
 
Excellent
15 years ago (kishore kumar)
80%StarStarStarStarStar