Routing issue |
Hi;
I have made some small changes in route in order to show a URL in a slightly different way. It works fine locally but not on-line. What am I doing wrong? This works fine: Code: http://localhost:8888/breakup_opt/get-ex-girlfreind-back/first-thing-to-do-before-getting-your-ex-back This doesn't (shows 404) Code: http://mywebsite.com/get-ex-girlfreind-back/first-thing-to-do-before-getting-your-ex-back Here is my route: PHP Code: $route['get-ex-girlfreind-back/(:any)'] = 'blog/index/$1'; Here is blog controller: PHP Code: class Blog extends CI_Controller { Thanks
I can't find anything wrong in your route setting.
What's the value of $config['base_url'] in your config.php file?
It could be a previous defined route messing it up. Do you have any other routes defined with 'get-ex-girlfreind-back' as the first segment? If so, show all of those routes, and in order they are defined.
BTW friend uses ie, not ei ![]()
(04-29-2015, 11:16 AM)CroNiX Wrote: It could be a previous defined route messing it up. Do you have any other routes defined with 'get-ex-girlfreind-back' as the first segment? Not really. This is my route: PHP Code: $route['default_controller'] = 'opt'; (04-29-2015, 11:16 AM)CroNiX Wrote: BTW friend uses ie, not eiThanks for that.
If and only if you are using CI_3.0.0 then check the update logs because the routing has changed.
PHP Code: // $route['get-ex-girlfreind-back/(:any)'] = 'blog/index/$1';
(04-29-2015, 07:39 PM)John_Betong Wrote: If and only if you are using CI_3.0.0 then check the update logs because the routing has changed.yeh I am on CI 3...But I didnt have issues with other files. For example this works fine: PHP Code: $route['video/(:any)'] = 'video/index/$1'; I tried it for that page it didn't work ![]()
Found it wow you wow you couldnt have guessed!!!!!!!!
The controller was blog.php not Blog.php!!!!! I renamed it to capital B and it started to work! Why is that? (04-30-2015, 02:24 AM)Narf Wrote:(04-29-2015, 08:39 PM)behnampmdg3 Wrote: Found it wow you wow you couldnt have guessed!!!!!!!! Maybe Windows doesn't make a difference between a Big "B" and a small "b", but ex girlfriends do! ![]() |
Welcome Guest, Not a member yet? Register Sign In |