23 June 2007

From Organic Design wiki
Warning.svg This is a blog item that needs to be converted to the new Bliki format


OD's URL's get slightly friendlier

Our Mod-Rewrite rules have been updated today to allow them to become even more friendly by not appending any page name to the URL when requests are made to the naked domain name. The new rules are as follows:

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/(.*) /index.php/Main_Page [L]
RewriteCond %{REQUEST_URI} !^/(wiki|files)/
RewriteRule ^/(.*) /index.php/$1 [L]

The first condition and rule pair handles requests to the naked domain name and rewrites the to Main_Page so that the URL doesn't get appended with the "Main Page" name. The second pair says not to touch any URL's which start with /wiki/ or /files/, this protects all old-style article requests, and requests to internal MediaWiki files like scripts or images. It also allows other directories of web documents outside the wiki such as http://www.organicdesign.co.nz/files/od/media

See also