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.

start phalcon with guide

http://docs.phalconphp.com/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%5exercise

thanks for any help!!!



335

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



19.6k
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)



335

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



335
edited Aug '14

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



84.5k
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;
});

http://docs.phalconphp.com/en/latest/reference/tutorial.html#bootstrap



335

thanks very much!