CodeIgniter Forums
Stop Routing Assets Folder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Stop Routing Assets Folder (/showthread.php?tid=84760)



Stop Routing Assets Folder - edeng - 11-07-2022

Hello all,
I have CI 4.2.9 installed on Dreamhost.  I have the following structure:

-app
-public
-spark
-system
-tests
-writable
In this top level folder, I also have the following .htaccess file:

Code:
# Customized error messages.
ErrorDocument 404 public/index.php

# Set the default handler.
DirectoryIndex public/index.php

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ public/index.php?/$1 [L,QSA]
</IfModule>

Under my public file I put an assets folder with my css and js files.  I think include them in my view files like:
    
<link href="/assets/css/style.bundle.css" rel="stylesheet" type="text/css" />

But they aren't loading and when I click on the file directly from the source code generated, I get:

Can't find a route for 'get: assets/css/style.bundle.css'.
How can I tell CI to stop routing the assets folder?

Thank you!