I have these lines in my httpd.conf which make the all the url as a single parameter ('name') and when I type an name that doesen't exist index.php is loaded properly and a 404 message is shown. But the problem is that JavaScript, CSS and other assets are not loaded. How to load those files even if a dir/ file doesn't exists. ? I'm using relative paths. Thanks ;)
<Directory "c:/Apache24/htdocs/public">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?name=$1 [QSA,L]
</IfModule>
</Directory>
<head>section of your page's HTML:<base href="/" />so that every relative URL is resolved from that URL and not the current page's URL.