Nice URLs for phpSATk

Internally the use of nice urls is triggered by a environment variable PHPSATK_NICEURLS which needs to be set to “On”.

As all internal URLs should be generated using the builtin method (SATInstallation), switching this setting should not cause any trouble - just make sure to clear caches because they could be storing already prepared URLs.

For Apache

There is a file called “.htaccess.txt” included in the htdocs folder which contains the needed configuration for having nice urls enabled. Rename it to “.htaccess”. It requires mod_rewrite and mod_env.

For LigHTTPd

Add this to your lighttpd configuration for the appropriate host. Requires “mod_rewrite” and “mod_setenv” to be included in server.modules.

url.rewrite-once = (
	"/files/(.*)" => "/files/$1",
	"/([^\/]+)/?(([^\?]+))?(\?(.*))?" => "/index.php?app=$1&path=/$3&$5"
)


setenv.add-environment = (
	"PHPSATK_NICEURLS" => "On"
)

You need to prefix the expressions above if phpSATk has been installed into a subdirectory.

 
nice_urls.txt · Last modified: 2007/03/23 11:25 by mbechler
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki