Welcome Guest, Not a member yet? Register   Sign In
URL strings are causing 404
#4

In /application/config/config.php:
PHP Code:
$config['uri_protocol'] = 'REQUEST_URI'

In /application/config/routes.php:
PHP Code:
$route['translate_uri_dashes'] = true

The translate_uri_dashes setting in the routes file allows CI to map something like /classes-and-courses/holiday-courses to a controller named Classes_and_courses and a method named holiday_courses(). You don't necessarily need this setting, though. You can just set the routes manually, like this:

PHP Code:
$route['classes-and-courses/holiday-courses/(:any)'] = 'classes_and_courses/holiday_courses/$1';
$route['classes-and-courses/(:any)/(:any)'] = 'classes_and_courses/$1/$2';
$route['classes-and-courses/(:any)'] = 'classes_and_courses/$1'

The question is, which URL "works" with which setting?

When the classes-and-courses URL doesn't "work", how are you trying to get the query string? For example, have you tried $this->input->get('utm_medium')?
Reply


Messages In This Thread
URL strings are causing 404 - by 0x1027 - 07-06-2016, 02:02 AM
RE: URL strings are causing 404 - by arma7x - 07-06-2016, 03:22 AM
RE: URL strings are causing 404 - by 0x1027 - 07-06-2016, 03:27 AM
RE: URL strings are causing 404 - by mwhitney - 07-07-2016, 10:00 AM
RE: URL strings are causing 404 - by 0x1027 - 07-11-2016, 01:34 AM
RE: URL strings are causing 404 - by mwhitney - 07-11-2016, 08:37 AM
RE: URL strings are causing 404 - by 0x1027 - 07-11-2016, 08:41 AM
RE: URL strings are causing 404 - by mwhitney - 07-11-2016, 09:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB