Welcome Guest, Not a member yet? Register   Sign In
Noob problem! 404 not found[SOLVED]
#1

[eluser]Ivar89[/eluser]
ok, here's the deal.
I have a page called main/index
I have a button that goes to main/index
I have a controller which is called main and has a function index
Here is the code:
View menuSadpart)
Code:
<label class="home"><a href="&lt;?php echo site_url('main/index'); ?&gt;">Home</a></label>
Controller(main):
Code:
function index()
    {
        $this->load->view('main/index');
    }
When I click on the button I go to: localhost/main/index
Localhost/ is homepage and also the main/index
So both are same page but he can't seem to figure it out when the url changes
what am I forgetting?

EDIT: route:
Code:
$route['default_controller'] = "main";

erros code 404
Not Found

The requested document was not found on this server.
Web Server at ivarvisser.nl
#2

[eluser]InsiteFX[/eluser]
Use the CodeIgniter Anchor tag.

InsiteFX
#3

[eluser]Ivar89[/eluser]
nope no difference
#4

[eluser]Mantra of Doom[/eluser]
Do you have an .htaccess file that may be restricting access? If you don't have an .htaccess that removes the index.php from the url, once you move from the start page, your url should look more like this: http://localhost/index.php/main/index
#5

[eluser]Ivar89[/eluser]
[quote author="Mantra of Doom" date="1295554488"]Do you have an .htaccess file that may be restricting access? If you don't have an .htaccess that removes the index.php from the url, once you move from the start page, your url should look more like this: http://localhost/index.php/main/index[/quote]

OMg thanks I accidently removed the htaccess, that one used to remove index.php OMG stupid!

thanks




Theme © iAndrew 2016 - Forum software by © MyBB