php - Setup cakephp in subfolder on AWS -


i had shifted cakephp website subfolder on aws ubuntu machine. site working css, images , js not loading. getting 404 not found error.

not found  requested url /demo/css/mscrollar/jquery.mcustomscrollbar.min.css not found on server. 

urls working index.php.

here htaccess

<ifmodule mod_rewrite.c>  rewriteengine on  rewritebase /demo  rewriterule ^media/(.*) http://%{http_host}/files/timthumb.php?src=http://%{http_host}/app/webroot/files/$1 [l,r=301]  rewriterule    ^$ app/webroot/    [l]  rewriterule    (.*) app/webroot/$1 [l] </ifmodule> 

please help

you need create 2 htaccess files. 1 in webroot , 1 in root path. 1 in root (./.htaccess) should (replace your_path):

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

the 1 in webroot folder (./app/webroot/.htaccess) should this:

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

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -