The request redirection emulation is done by rewriting some request variables that contain request paths, like SCRIPT_FILENAME, SCRIPT_NAME, PHP_SELF, REQUEST_URI, PATH_TRANSLATED, and QUERY_STRING.
It can parse and change the output of the current page script to rewrite the URLs links (also in image maps) or images in the page with absolute URLs, relative URIs and URLs that contain scheme and host (http://www.somehost.com). Relative parent directory URIs (../) are also supported.
You can do the rewriting by using PHP buffering support.
Then the class optionally can compress the processed page output to serve the page in less time if the user browser supports compression.
Or you can rewrite a string with the string-rewrite method, if you cannot (or don't) want use the buffering support.
Transform URLs to make them search engine friendly
Clean URL is a class that implements a method to make URLs more user and search engine friendly by removing '?' and '=' symbols from URI.
This class is meant to be used in conjunction with URL rewriting Web server modules that map the cleaned URLs generated by this class into common URLs with query parameters.
allows you to use a pseudo directory path in your HTML links --instead of a query string-- to declare variables so that your pages will be properly crawled by search engines. This is an alternative to using mod_rewrite rules to handle your URIs (http://httpd.apache.org/docs/mod/mod_rewrite.html). I based this on several articles and news posts I read on how search engines crawl dynamic, php-generated URLs.
see the class comments for more info and links to the articles.
Rewrite request variables based on the request URI
This class can rewrite request variables by parsing the request URI in a similar way to what the Apache module mod_rewrite does but without using regular expression based rules.
It allows to map a request to an URL like http://webseite.com/pages/index.1.html into the equivalent to a request to http://website.com/index.php?method=pages&page=1 .
The mapping is performed by a script that handles page access errors by using the class to rewrite the request variables.