Routes modification causes fuel cms backend login page to disappear
Not sure where else I should put there because there's no general category but I seem to be causing an error when I add the following route configurations:
$route['(fuel|fuel:any|faq|faq:any|backstage|backstage:any|auth|auth:any|assets|assets:any)'] = "$1";
$route['(:any)'] ="registry_page";
$route['(:any)/(:any)'] ="registry_page";
Any ideas how I can make it so that when you go to mysite.com/fuel it goes to the fuel cms login page?
Comments
What do you suggest I change the MY_fuel.php $config['fuel_path'] value to? It's currently set to the default 'fuel/' which should be correct.
http://website.com/fuel/envelope_order_activities/items/?search_term=&limit=50&view_type=list&offset=0&order=asc&col=source_1&fuel_inline=0&csrf_token=4bfd43c345c7e70484c5f1a9a248d9be
I'm thinking it might be the question mark in the URL that's causing it?
http://snag.gy/XJSij.jpg
Here's a screenshot of the network activity within Chrome's browser console:
http://snag.gy/4mwIp.jpg
you can see this problem happening for yourself by creating a simple module and adding routes that allows for dynamic URLs like what's used for Twitter (ie: twitter.com/username).
Here's an example route file that would cause the issue:
$route['default_controller'] = 'fuel/page_router';
$route['404_override'] = 'fuel/page_router';
$route['(google_analytics|google_analytics:any|assets|assets:any|about|help|help:any|faq|faq:any|questions|questions:any|ajax|ajax:any|auth|auth:any|checkout|checkout:any)'] = "$1";
$route['fuel/(:any)'] = 'fuel';
$route['tracking/(:any)'] = 'tracking';
$route['login/(:any)'] = 'user_login';
$route['(:any)'] = 'profile';
$route['(:any)/(:any)'] = 'profile';
$route['(:any)'] = 'profile';
$route['(:any)/(:any)'] = 'profile';
Has anyone ever faced this issue??? Surely I can't be the only one who has needed dynamic something like this.
$route['fuel'] = 'fuel';
$route['fuel|fuel:any'] = '$1';
$route['fuel|fuel/(:any)'] = '$1';
anyway.. i've tried all variations and nothing seems to work. The issue also shows up even without the following:
$route['(:any)'] = 'profile';
$route['(:any)/(:any)'] = 'profile';
Instead of this:
$route['fuel'] = 'fuel';
$route['(:any)'] = 'profile';
$route['(:any)/(:any)'] = 'profile';
Use this:
$route['^(?!fuel)\S*'] = 'profile';
I hope this helps someone out in the future. Thanks for assisting, admin!
Side question:
1. How do I properly display code on the forum?
2. When I load website.com/fuel, it redirects to website.com/fuel/index and can't find the page... anyway to fix this?
2. Are you on an older version of FUEL? The reason I ask is because it should be redirecting to start instead of index to prevent some issues we found on certain environment setups.