I'd probably use some If Statements pulled in with a PHPInclude that force each page to check and alter the url?