Welcome Guest, Not a member yet? Register   Sign In
url case sensitivity
#4

[eluser]Sy[/eluser]
OK.. so i found the problem, but i need someone to tell me if its a bug or not....

it turns out when trying to identify the url it runs the following code in the URI.php file at line 200

Code:
elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
  {
   $uri = substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
  
  }

which is basically stripping off the directory name which contains the raw index.php file. this is fine for most things, and fine for linux where the path is case sensitive anyway.

However when routing to the Welcome/index action via the default handler this code is ignored, meaning that my caseTest and casetest don't experience anything different on the starting page.

however once the user has browsed to my opening page and clicked a link, the url happily strips the correctly cased casetest from its url, but not the incorrectly cased. meaning that the user is ALWAYS presented with a nice front login screen but every link is broken.

I couldn't find anything that allowed me to specify the case sensitivity of the directory to fix i replaced the strpos with stripos;

Code:
elseif (stripos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
  {
   $uri = substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
  
  }
and hey presto now my url is case insensitive and i can access the application from either url!

So... personally i think this is a bug unless there is a specific reason for this?


Messages In This Thread
url case sensitivity - by El Forum - 08-08-2012, 06:23 AM
url case sensitivity - by El Forum - 08-08-2012, 08:34 AM
url case sensitivity - by El Forum - 08-08-2012, 09:05 AM
url case sensitivity - by El Forum - 08-08-2012, 09:53 AM
url case sensitivity - by El Forum - 08-08-2012, 10:02 AM
url case sensitivity - by El Forum - 08-09-2012, 01:24 AM
url case sensitivity - by El Forum - 08-09-2012, 11:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB