Nette 2.1.0, Quickstart, href
- tzang
- Member | 4
Hi, guys,
While following the tutorial quickstart, I've met an unexpected problem which I can't solve for hours
- default.latte
<h2><a n:href=“Post:show $post->id”>{$post->title}</a></h2>
- PostPresenter.php
class PostPresenter extends BasePresenter
{
private $database;public function __construct(Nette\Database\Context $database)
{
$this->database = $database;
}public function renderShow($postId)
{
$this->template->post = $this->database->table(‘posts’)->get($postId);
if (!$post) {
$this->error(‘Post not found’);
}$this->template->post = $post;
}}
- linked url
http://localhost/nette-blog/www/post/show?postId=5
- result when clicked
The requested URL /nette-blog/www/post/show was not found on this server.
Could someone tell me a way to get out of this?
Thanks in advance
Last edited by tzang (2014-01-16 18:00)
- screenas
- Member | 5
Use Nette requirements
checker
in case that mod_rewrite is not enabled, open and edit your
httpd.conf file.
uncomment:
#LoadModule rewrite_module...
to
LoadModule rewrite_module...