A simple way to strat php site in your localhost for good project, including 'core.php' in all header.php and header in all respective page, you will make your website easy to manage
RewriteEngine On
# Redireciona URLs que começam com /uploads/ para file.php
RewriteCond %{REQUEST_URI} ^/uploads/(.*)
RewriteRule ^uploads/(.*)$ uploads/file.php?name=$1 [NC,QSA,L]
# Redireciona todas as outras requisições para a pasta /public/
RewriteRule ^(.*)$ /public/$1 [L]
RewriteEngine On
# dissalow access to assets folder, but not files
RewriteCond %{REQUEST_FILENAME} assets(.*)/$
RewriteRule ^(.*)$ / [R=404,L]
# call the page but not showing /public/ in the url
RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC]
RewriteRule ^ %1 [L,NE,R=302]
RewriteCond %{THE_REQUEST} -d
RewriteRule ^((?!public/).*)$ $1 [L,NC]
# Página 404 para arquivos não encontrados
ErrorDocument 404 /404.php