Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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


568

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

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



67.7k

show us your router configuration please



568
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.phalconphp.com/en/latest/reference/tutorial.html#designing-a-sign-up-form

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



67.7k

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



568
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



67.7k

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 )



568
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



568
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...