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

routiing not working

I am having a routing error, when i point to project/ I can see the folder structure /app and /public when I click on /public folder I can see the output of indexAction in indexController right now my url is localhost/project/public/ and I have created SignupController and indexAction if i access the page localhost/project/signup getting an 404 page not found error same if i access localhost/project/public/signup

my .htaccess file is

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule  ^$ public/    [L]
   RewriteRule  (.*) public/$1 [L]
</IfModule>

I am using ubuntu elementary os luna server apache2 Am I following correctly please help.

Remove the <IfModule> commands and see what happens. It's possible you don't have mod rewrite installed. You also need an .htaccess file inside public/ to redirect requests such as project/signup/ to your index.php file.

edited Apr '14

the command a2enmod rewrite shows Module rewrite already enabled project/.htaccess file is

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule  ^$ public/    [L]
   RewriteRule  (.*) public/$1 [L]
</IfModule>

and project/public/.htaccess file is

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>

and i removed <ifModule> tags from both the .htaccess files restarted the server same result. tryed removing both htaccess file, same result again folder struture . Please help.

You probably don't have .htaccess "enabled", go to your httpd.conf and set AllowOverride All in one of your <Directory> config (there should be AllowOverride None by default on the httpd.conf). Then restart your apache daemon.