www/presenter/akce not found

nord
Člen | 52
+
0
-

Zdravim vsetkych

mam nasledujuci problem s ktorym si neviem dat rady

http://127.0.0.1/domena/www/ funguje,
ale akonahle chcem prejst na iny presenter napr http://127.0.0.1/…gory/view/15 tak mi hodi chybu

Not Found

The requested URL /domena/www/category/view/15 was not found on this server.

Apache/2.4.18 (Ubuntu) Server at 127.0.0.1 Port 80

Ako nastavit aby tieto url fungovali ? .htaccess vo www vyzera nasledovne

# Apache configuration file (see https://httpd.apache.org/docs/current/mod/quickreference.html)
Allow from all

# disable directory listing
<IfModule mod_autoindex.c>
	Options -Indexes
</IfModule>

# enable cool URL
<IfModule mod_rewrite.c>
	RewriteEngine On

	# RewriteBase /

	# prevents files starting with dot to be viewed by browser
	RewriteRule /\.|^\.(?!well-known/) - [F]

	# front controller
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz|map)$ index.php [L]
</IfModule>

# enable gzip compression
<IfModule mod_deflate.c>
	<IfModule mod_filter.c>
		AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml image/svg+xml
	</IfModule>
</IfModule>

Router factory takto

<?php

namespace App;

use Nette;
use Nette\Application\Routers\Route;
use Nette\Application\Routers\RouteList;


class RouterFactory
{
	use Nette\StaticClass;

	/**
	 * @return Nette\Application\IRouter
	 */
	public static function createRouter()
	{
		$router = new RouteList;
		$router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
		return $router;
	}
}

kde mozem hladat chybu ked sa nevie pripojit na ziadny presenter, okrem homepage

Za kazdu pomoc dakujem

Editoval nord (5. 10. 2017 20:31)

nord
Člen | 52
+
0
-

Riesenie:

/etc/apache2/apache2.conf

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

Change the AllowOverride None to AllowOverride All

Samozrejme Linux. Neviem ci je to rovnake v inych OS

Editoval nord (5. 10. 2017 21:25)

nightfish
Člen | 472
+
0
-

nord napsal(a):
Samozrejme Linux. Neviem ci je to rovnake v inych OS

I na Windows má Apache v defaultní konfiguraci na DocumentRootu vypnutý AllowOverride.