I'm building a php application with MVC, the problem is when accessing other directories through the URL, eg: mvc / user now: mvc / user / create (here the sheet of css styles and javascript are no longer found), what is the best way to fix this? to set a constant or configure htaccess?
Structure
-controllers/
-lib/
-public/
--css/
--js/
--images/
-models/
-views/
--Index/
--Create/ ...
Header.phtml
Footer.phtml
.htaccess
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1
Very simple.