Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Redirect
#2

Forget the whole thing about routing.
Simply put the following code in your navigation.php file:
PHP Code:
echo anchor('https://accounts.google.com/ServiceLogin?elo=1','Google Analytics'); 

In order to use the anchor function, you need to load the url helper. It's a good idea doing that in the config/autoload.php file:
PHP Code:
$autoload['helper'] = array('url'); 

Besides that, if you want to link to URL's within your own website, you don't need to include site_url at all.
This will do:
PHP Code:
echo anchor('cpages/settings','Settings'); 

And you DON'T need a routing if the url itself is good enough.
A line like you have:
PHP Code:
$route['cpages/googleanalytics'] = 'cpages/googleanalytics'
makes no sense at all.

Routing is needed if you want your url to point to a different controller/method.
So this would make sense:
PHP Code:
$route['tools/googleanalytics'] = 'cpages/googleanalytics'
Reply


Messages In This Thread
[SOLVED] Redirect - by davy_yg - 07-29-2016, 03:50 PM
RE: Redirect - by Wouter60 - 07-30-2016, 03:23 AM
RE: Redirect - by davy_yg - 07-30-2016, 08:19 PM
RE: Redirect - by Wouter60 - 07-30-2016, 11:30 PM
RE: Redirect - by davy_yg - 07-31-2016, 06:53 PM
RE: Redirect - by GoodWin - 08-02-2016, 12:13 AM
RE: Redirect - by Wouter60 - 07-31-2016, 11:09 PM
RE: Redirect - by InsiteFX - 08-01-2016, 05:33 PM
RE: Redirect - by davy_yg - 08-02-2016, 08:01 PM
RE: Redirect - by Wouter60 - 08-03-2016, 02:43 AM
RE: Redirect - by davy_yg - 08-04-2016, 08:35 PM
RE: [SOLVED] Redirect - by PaulD - 08-05-2016, 06:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB