I have a cakephp application running in local server (Ampps for mac). when I type the url in the navigator I can't see css and js files loaded. When I check the console I find these errors :
Failed to load resource: the server responded with a status of 404 (Not Found) /app/webroot/files/masque_maroc.geojson:1 Failed to load resource: the server responded with a status of 404 (Not Found) /maps/display_time_filter_box:1 Failed to load resource: the server responded with a status of 404 (Not Found) /maps/display_filter_box:1 Failed to load resource: the server responded with a status of 404 (Not Found) /maps/get_data:1 Failed to load resource: the server responded with a status of 404 (Not Found) /maps/categories_menu:1 Failed to load resource: the server responded with a status of 404 (Not Found) /maps/mobile_categories_menu:1 Failed to load resource: the server responded with a status of 404 (Not Found) I did some researches, I found that I had to edit my .htaccess files of /app and Applications/AMPPS/www/carte_drin folders, I also added another one directly in www folder.
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /Applications/AMPPS/www/carte_drin/app RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/(app/webroot/)?(img|css|js)/(.*)$ RewriteRule ^(.*)$ index.php [QSA,L] </IfModule> Yet the error is still there
Some says that I have to delete all .htaccess files and uncomment
Configure::write('App.baseUrl', env('SCRIPT_NAME')); of app/config/core.php yet the erros perist I don't know what I'm missing. Your help would precious thank you!

RewriteCond %{REQUEST_FILENAME} !-fmeans that the followingRewriteRuledoes not apply if a matching file exists. Please check ifmod_rewriteis enabled in your environment. You could do so by placingphpinfo();inside a PHP file on the server and search formod_rewriteon the resulting page. If it is enabled, please post the contents of all.htaccessfiles, which CakePHP version you are using and where your JS and CSS files are located.