We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

can't access other controller or action except indexAction(indexController)

i start learn this from a couple days ago,and i copy those code from the tutorial, file stuctrue also is the same.Everything looks well ,but when i access the site, i have found every Controller is not working but indexAction(indexController), i can't figure out what's going on ,did i miss something?

Platform:OS X 10.10.5 Yosemite / apache 2.4.16(Preinstall) / php 5.6.14

Directory tree:

└── p1

├── .htaccess

├── app

│   ├── controllers

│   │   ├── IndexController.php

│   │   └── SignupController.php

│   ├── models

│   └── views

│       ├── index.phtml

│       └── signup

│           └── signup.phtml

└── public

    ├── .htaccess

    ├── css

    ├── img

    ├── index.php

    ├── index.php.old

    └── js


1.1k

did you check this https://forum.phalcon.io/discussion/9077/routing-problem-see-index-everyway ?

It's look like same problem, but does't working for me :)



85.5k

show us your router configuration please



1.1k
edited Oct '15

show us your router configuration please

All my code is copy from this tutorial ,and i stay in this step : :https://docs.phalcon.io/en/latest/reference/tutorial.html#designing-a-sign-up-form

before using my mac ,i tested it on my PC ,it's working well



85.5k

can you find a way to check if rewrite_module is enabled in your mac ?



1.1k
edited Oct '15

can you find a way to check if rewrite_module is enabled in your mac ?

of cource , i try to install wordpress ,and it's working.

BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /cms/wp1/

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /cms/wp1/index.php [L]

</IfModule>

END WordPres



85.5k

i dont know without seeing it. Hopefully someone else can think of something.

( my guess would be that you missed a small detail / config somewhere )



1.1k
edited Oct '15

i dont know without seeing it. Hopefully someone else can think of something.

( my guess would be that you missed a small detail / config somewhere )

thx ,anyway



1.1k
Accepted
answer
edited Oct '15

i just download the offical source from github, and I used the official code to compare with mine, I realized ,i didn't create new dir for indexController.╮(╯▽╰)╭

right way:/views/index/index.phtml

my way:/views/index.phtml

bazinga...