Only fill this in if you're a spammer huh? Your name :
Your email :
Your message :
Dec
2nd
2006

Clean urls on windoze !!

Posted in : Hacks

Damn it would appear that I've stumbled across a way to get clean urls working on a windoze box. It requires a shedload more testing, but this is the gist of it.

1) Enable a custom 404 for your blog folder ( urm, there's probably summat in your ControlPanel to do it, or just hit IIS huh?) and point it at /[path to blogs]/index.php

2 )Create a conf/hacks.php with the following code :-

Code:

<?php
/*
* Extra Path ? On windows? :O
*/
if( !defined('EVO_CONFIG_LOADED') ) die( 'Please, do not access this page directly.' );
 
if( ( ! isset( $resolve_extra_path ) || $resolve_extra_path ) && is_windows() )
{
  $ReqPath = preg_replace( '#^(.+?):80([^?]+?)(\?.+?)*$#', '$2', $ReqURI );
  $ReqURI = preg_replace( '#^(.+?):80(.+?)$#', '$2', $ReqURI );
}
?>

3) Turn extra path on in admin ..... kinda helps

That's it, extra path should now work!

¥

Trackback URL (right click and copy shortcut/link location)

Trackback url for this post
Note : This trackback url is time limited so use it within 30 minutes or the SpamHound will snarl at you.

http://waffleson.co.uk/z/?k=317826026331032388f89d303d159587ab7c1969f5a57bfa8

Comments are closed for this post.