url rewriting - .htaccess is not working in my PHP MVC Framework -


i building own php mvc framework scratch on ubuntu. .htaccess file not working in it. folder structure , .htaccess file content bellow.

folder structure

/mymvcproject /controllers      index.php      help.php /libs /modles /views .htaccess index.php 

.htaccess file content

rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewritecond %{request_filename} !-l rewriterule ^(.*)$ index.php?url=$1 [qsa,l] 

when type localh0st/mymvcproject/help gives me following error.

not found
requested url /mymvcproject/help not found on server.
apache/2.2.22 (ubuntu) server @ localh0st port 80

and i'm sure have enabled mod_rewrite.

try way , $_request array can url parameter , handle in index.php file.

also testing purpose add

echo <pre>; print_r($_request); echo </pre>; 

at first lines of index.php

<ifmodule mod_rewrite.c>     rewriteengine on      rewritecond %{request_uri} ^/$ [nc]     rewriterule ^(.*)$ /$1 [r=301,l] </ifmodule> 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -