routing question |
[eluser]dadamssg[/eluser]
i guess my question is...how do i exclude 'main' from being redirected?
[eluser]dadamssg[/eluser]
im beginning to question where i shouldve put the CodeIgniter folder. I put as a folder at my root next to my index.php frontpage. Should i have just put the System folder found within the CodeIgniter there instead? I say this because all of my urls have the CodeIgniter folder in them like below http://myexample.com/CodeIgniter/index.php/form
[eluser]WebsiteDuck[/eluser]
You'll have to use regular expressions Code: $route['(^[^(main)])'] = "controller/function/$1"; I don't think that works, I'm not very good at regular expressions
[eluser]WebsiteDuck[/eluser]
As for the codeigniter folder question, you can get around that with an .htaccess file Code: <IfModule mod_rewrite.c> This says, if the request is not a valid file or folder, send it to /codeigniter/index.php Then, instead of http://myexample.com/CodeIgniter/index.php/form you can do http://myexample.com/form
[eluser]mcr_rm[/eluser]
I think you need to do far more complex routing than that. I think you would need to overide the default index routing using remap http://ellislab.com/codeigniter/user-gui...#remapping then pass the paramter through a method created in a model or otherwise to check if a user exists then if not check for other methods that could exist (for standard page routing). I have done something before outside of codeigniter that does this whereby we mod rewrite to index and first parse the routing against pages in the system before passing it to a data call to check for a saved custom page. It would be far easier to create a controller one level down so site.com/u/username but to get what you want and still make a site that can show other pages than profiles you need to do some reworking of the routing. I don't think solely using any to parse a username is good enough.
[eluser]dadamssg[/eluser]
so i add that to my .htaccess file found in my root folder? |
Welcome Guest, Not a member yet? Register Sign In |