Welcome Guest, Not a member yet? Register   Sign In
uri routing - doesn't work with colon ( : )
#1

[eluser]tewoos[/eluser]
I have a problem with this expression:
$route['tutorialSad\d+)(/(.*))?'] = "tutorial";

it gives an 403 Forbidden error. an example for the usage of this url is like below:
www.site.com/tutorial:1200/title-of-tutorial-with-id-1200

if I try this expression with a '-' instead of ':' after tutorial string, it works perfectly. how can I use : (colon) in urls ?

in config.php allowed characters is set like below:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';
#2

[eluser]Matthew Lanham[/eluser]
Im not 100% sure, but i dont think : are permitted in url's as they denote a port change i.e. http://localhost:81 for port 81.... but as i say im not 100% sure...
#3

[eluser]tewoos[/eluser]
nope, it is allowed... there is already some big sites that is using colon in their urls.
#4

[eluser]tewoos[/eluser]
no suggestion ?? I think this is a simple problem. is there anybody from codeigniter developer team ? I searched about this problem in forum and google, couldn't find any solution...
#5

[eluser]Matthew Lanham[/eluser]
maybe try:

$route[’tutorial\Sad\d+)(/(.*))?’] = “tutorial”;
#6

[eluser]tewoos[/eluser]
I have tried this, but it didn't work.




Theme © iAndrew 2016 - Forum software by © MyBB