How can I load CSS files located outside the web root from within a custom module?
I need to store my css files at a location outside Drupal’s path (e.g. /srv/assets/css/my_site/general.css). I attempt to achieve this using drupal_add_css
but the browser loads them from:
http://www.my-site.com/srv/assets/css/my_site/general.css
which results of course in 404 error.
Any idea how to load those external (file system) CSS files from within a module? note: I am using Linux.
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.