I am struggling to get my website's CSS, IMG and JS resources to show. My website has this structure:
root
classes
templates
public
images
scripts
styles
index.php
Procfile
apache.conf
Now, I know this problem is caused by my apache rewrites because when I include them, my PHP works but my images don't. When I don't include them, my PHP is broken by the assets work. Strangely thought I had to add a slash to the front of my rewrite rule, as the originally recommended index.php did not work and had to be changed to /index.php
My Proc file sets up public to be the root, and my rewrites look like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /index.php [NC,L]
With the above, my PHP code works fine. My question is, how please can I get it so the rewrite results don't break all my assets from loading? When I view the source of the site, they are located in the right place, just I think they are being blocked from loading.