php - Friendly URLs cakephp 2.3 -


i'm new using cakephp, , i'm trying set friendly urls site, i'm having problems.

i've made steps cakephp 2.3 book says, , apache configuration says mod_rewrite being executed.

and when enter main page of cake, says url rewriting not configured, , when want acces web need go throught www.mysite.com/index.php/controller/function , of course, want this: www.mysite.com/controller/function, , if try route, says not found in server (and have controller , function created).

this .htacces files:

root directory:

<ifmodule mod_rewrite.c>    rewriteengine on    rewriterule    ^$ app/webroot/    [l]    rewriterule    (.*) app/webroot/$1 [l] </ifmodule> 

app directory:

<ifmodule mod_rewrite.c>    rewriteengine on    rewriterule    ^$    webroot/    [l]    rewriterule    (.*) webroot/$1    [l] </ifmodule> 

webroot directory:

<ifmodule mod_rewrite.c>     rewriteengine on     rewritecond %{request_filename} !-d     rewritecond %{request_filename} !-f     rewriterule ^(.*)$ index.php [qsa,l] </ifmodule> 

i resolved it. in file /etc/apache2/sites-enabled/000-default directory pointing /var/www , cakephp directory in /var/www/html/myapp/cakephp. changed , working! :)


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -