Notice Undefined index url

Posted by user1906992 on Stack Overflow See other posts from Stack Overflow or by user1906992
Published on 2012-12-15T22:46:06Z Indexed on 2012/12/15 23:03 UTC
Read the original article Hit count: 120

Filed under:
|

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) [function.require]: 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 my settings are wright.

© Stack Overflow or respective owner

Related posts about php

Related posts about mod-rewrite