Problem with regex and uri - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Problem with regex and uri (/showthread.php?tid=19850) |
Problem with regex and uri - El Forum - 06-20-2009 [eluser]Mareshal[/eluser] This is what I want to do: If I type http://localhost/domain.com => output domain.com If I type http://localhost/domain.com/second_uri => generate error page(not 404 not found from ci). I don't want it to search and try to call "domain.com" controller If I type http://localhost/controller/method => load my controller etc Here are my methods from "main" controller: Code: function index(){ ... and modified routes: Code: $route['[a-zA-Z0-9\-\.]+\.(com|org|net|COM|ORG|NET)'] = "main/domain/$1"; Any ideas? Is emergency |