Possible Duplicate:
PHP: “Notice: Undefined variable” and “Notice: Undefined index”
I'm doing youtube mvc tutorial http://www.youtube.com/watch?v=Aw28-krO7ZM and have stopped on the best first step:
my index.php file:
<?php
$url = $_GET['url'];
require 'controllers/' . $url . '.php';
My .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
So, the question is next: when I go on any other URL except 'index' it works good. So what's wrong with 'index' url?
Notice: Undefined index: url in /var/www/sadman/index.php on line 2
Warning: require(controllers/.php) [<a href='function.require'>function.require</a>]:
failed to open stream: No such file or directory in /var/www/sadman/index.php on line 4
Btw, i have LAMP, and I think that my settings are right.