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

start phalcon with guide

https://docs.phalcon.io/en/latest/reference/tutorial.html#designing-a-sign-up-form when I finish the step as it says, the signup page can't be displayed. in the tutorials it is "<h1>Hello!</h1> <a href="/tutorial/signup">Sign Up Here!</a>", but mine is "<h1>Hello!</h1><a href="/public/signup">Sign Up Here!</a>"

my project github address is https://github.com/xsmyqf/phalcon_exercise

thanks for any help!!!



533

I am a beginner,please don't laugh at me!



33.8k
edited Aug '14

The HREF link starts the route from your server's root. If it is a folder called public, it should be href="/signup"

(PD: your github address doesn't work)



533

you can try to copy https://github.com/xsmyqf in the explore address,my target respository is :phalcon_exercise



533
edited Aug '14

I tried what you said, but it doesn't work!



98.9k
Accepted
answer

You have to add the baseUri relative to your installation as mentioned in the docs:

//Setup a base URI so that all generated URIs include the "tutorial" folder
$di->set('url', function(){
        $url = new \Phalcon\Mvc\Url();
        $url->setBaseUri('/tutorial/'); // or $url->setBaseUri('/');
        return $url;
});

https://docs.phalcon.io/en/latest/reference/tutorial.html#bootstrap



533

thanks very much!