Welcome Guest, Not a member yet? Register   Sign In
Cant call any controllers !!!
#1

[eluser]Unknown[/eluser]
Hello,

I a new to code Codeigniter, I am writing my first app and I am having problem with anchors calling controllers. The app initially loads correctly but any anchor/request to controller, returns Object not found 404.

I am running Xampp, the newest version on windows 7 64bits, i am also running the newest version of Codeigniter.

My site is called ignite2 (htdocs/ignite2)

I added an Apache Alias for it :

Alias /ignite2 "D:/xampp/xampp/htdocs/ignite2/"
<Directory "D:/xampp/xampp/htdocs/ignite2">
AllowOverride AuthConfig
</Directory>

my CI config base url :
$config['base_url'] = "http://localhost/ignite2/";
$config['index_page'] = "";


my anchors : <li>&lt;?php echo anchor("welcome/index","Classifieds");?&gt;</li>


Can someone please tell me what is wrong with my configuration, must be the application context conflict between CI and Apache..
#2

[eluser]InsiteFX[/eluser]
You need to load the url helper!

You can autoload it in application/config/autoload.php

InsiteFX
#3

[eluser]danmontgomery[/eluser]
[quote author="InsiteFX" date="1282125265"]You need to load the url helper!

You can autoload it in application/config/autoload.php

InsiteFX[/quote]

Why would not loading the url helper cause a 404?
#4

[eluser]danmontgomery[/eluser]
Is htdocs not your webroot? What's the purpose of creating an alias named identically to the folder it's aliased to? If you're using rewrite with aliases (which it looks like you are), you need to set your rewriterule to passthru ( [PT] )
#5

[eluser]InsiteFX[/eluser]
Maybe because the anchor uses the url_helper!

InsiteFX
#6

[eluser]danmontgomery[/eluser]
[quote author="InsiteFX" date="1282154108"]Maybe because the anchor uses the url_helper!

InsiteFX[/quote]

That would be a "call to undefined function" error, not a 404
#7

[eluser]minerbog[/eluser]
Is the 404 error a CI 404 error or the Apache default 404 error??
#8

[eluser]jegbagus[/eluser]
just remove your alias at apache, restart the apache.
and refresh the page.
why u use alias at htdoc folder. its really weird.




Theme © iAndrew 2016 - Forum software by © MyBB