Welcome Guest, Not a member yet? Register   Sign In
base_url
#1

[eluser]Bob Puzld[/eluser]
Hi, This is probably something easy, but I am somewhat a newbie to Codeigniter. Since I upgraded to the latest version of Codeigniter, my users get this error when logging out of the system:

404 Page Not Found
The page you requested was not found.


With this error my base url ends with /main/something

Here is my code from the logout...

Code:
<a >config->item('base_url')?&gt;login/logout">Logout</a>

Also, my config.php file uses the following code to name the base url...

Code:
$config['base_url']    = "http://www.mywebsite.com/";

Maybe I am looking in the wrong place, but any help would be appreciated.


-Bob
#2

[eluser]cahva[/eluser]
Can you give whole html output of the generated link?

BTW, you should use url-helper as that helps a lot Smile

The same with helper:
Code:
&lt;?php echo anchor('login/logout','Logout') ?&gt;

// Will create for example --&gt;
<a href="http://www.mywebsite.com/index.php/login/logout">Logout</a>

If you have .htaccess and you have removed the index.php from config, that will ofcourse be removed from url.
#3

[eluser]Bob Puzld[/eluser]
Here is the remaining code...

Code:
&lt;? if($this->session->userdata('ROLE') == 3): ?&gt;
<a >config->item('base_url')?&gt;districts/">Manage Communities</a><br />
<a >config->item('base_url')?&gt;users/">Manage Users</a><br />
<a >config->item('base_url')?&gt;collections/">Manage Collections</a><br />
<a >config->item('base_url')?&gt;organizations/">Manage Organizations</a><br />
<a >config->item('base_url')?&gt;reports/labels">Labels Report</a><br />
&lt;? endif; ?&gt;
<a >config->item('base_url')?&gt;login/logout">Logout</a>




Theme © iAndrew 2016 - Forum software by © MyBB