Question

I have set up a simple custom controller based on Alan Storm's tutorial. My controller action should be available on this URL:

http://magento.localhost/helloworld/index/index/

But this path gives a Magento 404 error. The controller is instead found on the following path:

http://magento.localhost/index.php/default/helloworld/index/index/

I don't understand why is this happening, as all of the tutorials and articles I found on the net tell me, that this should be working like that, none of them mention any extra tinkering. This problem is the same for built-in controllers too. This is a base CE 1.7 installation with sample data.

Can anyone shed some light on the matter? Thanks!

Was it helpful?

Solution

Most probably you have "Show store codes in url" set to "Yes". This explains the need for "default" in the url.
If you cannot access your controller at http://magento.localhost/default/helloworld/index/index/ it means that your mod_rewrite is not enabled or is wrongly configured. This explains the need for index.php in the url.

OTHER TIPS

I am on magento 1.8 and i fixed my 404 error by doing the following. inside Magentotutorial_Helloworld.xml they tell you to put this code in

"codePool local codePool"

since i do not have a local folder i put mine into the community folder. Change the code to this and it will work.

"codePool community codePool"

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top