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

Problem with the first tutorial

Hi , I am trying to do the following toturial (https://docs.phalcon.io/en/latest/reference/tutorial.html) and encounter some problems I have created the directories under my www_dir/tutorials (I am using Windows 8) I can't see my index page under https://localhost/tutorial but only under https://localhost/tutorial/public/ When I press the Sign up here button I am redirected to https://localhost/tutorial/signup and getting "The requested URL /tutorial/signup was not found on this server."



43.9k

Hi,

are both .htaccess files here in

www_dir/tutorial

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

and www_dir/tutorial/public

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

Yes they are in the right place with the right code I have the folowing files in my project

www_dir/tutorial

.htaccess

www._dir/tutorial/public

.htaccess , index.php

www._dir/tutorial/app/controllers

IndexController , SignupController

www._dir/tutorial/app/views/index

index.phtml

www._dir/tutorial/app/views/signup

index.phtml

Would like to hear some more suggestions



2.2k
Accepted
answer

WAMP configuration problem open apache http.conf then remove the # sign from LoadModule rewrite_module modules/mod_rewrite.so