Simple & Effective URL Routing System

CJ Jackson

  • I got myself a new iPad, a different world to the iPhone!
  • Posts: 241

Nao

  • Dadman with a boy
  • Posts: 16,079

CJ Jackson

  • I got myself a new iPad, a different world to the iPhone!
  • Posts: 241
Re: Simple & Effective URL Routing System
« Reply #2, on June 20th, 2011, 03:49 PM »Last edited on June 20th, 2011, 04:03 PM by CJ Jackson
I just updated to script, added rtrim($self, '/'), what I was thinking? forgetting to escape the trailing slash!

Did you try out IIS 7.5 on Windows 7 yet?

Nao

  • Dadman with a boy
  • Posts: 16,079

Eros

  • I has a thought. Be afraid.
  • Posts: 56
Re: Simple & Effective URL Routing System
« Reply #4, on June 30th, 2011, 04:50 AM »Last edited on June 30th, 2011, 06:08 PM by Eros
I'm curious about something....

Why didn't you go with something like:
Code: [Select]
$URI = $_SERVER['PHP_SELF'];

$URI = str_replace("index.php/", "", substr($URI,1,-1));

$Context['Request'] = explode("/",$URI);

For that first part?
18+ Roleplay Forum <- hopefully running Wedge when it is ready.

Yaoi RP Forum <- hopefully running Wedge when it is ready.