php-mvc-framework icon indicating copy to clipboard operation
php-mvc-framework copied to clipboard

Couldn`t figure out how to link to a local files/libraries (images, css, js)

Open Dr-help opened this issue 4 years ago • 5 comments

Hello there,

thanks a lot for the the great course and the lovely educational materials. Im learning an experimenting with the framework and couldnt figure out how to modify the code to link to local js, css files instead of the online ones (JQuery, Bootstrap ..etc).

I tried all the tricks I know, with no avail. could you please help with that?

Dr-help avatar Jul 26 '21 19:07 Dr-help

@thecodeholic could you kindly, suggest something to help!

Dr-help avatar Jul 30 '21 22:07 Dr-help

did you solve the problem?

RobertoVasquez01 avatar Jan 10 '22 01:01 RobertoVasquez01

If you have a look at layout files - like this one you can see how it includes the local CSS file. Your CSS/JS or any static files must be inside public folder.

Please let me know if you find the answer.

thecodeholic avatar Jan 10 '22 07:01 thecodeholic

The framework is not the problem. The problem is the configuration of the .htaccess file.

RobertoVasquez01 avatar Jan 11 '22 01:01 RobertoVasquez01

Try this one.

​RewriteEngine​ On ​RewriteCond​ ​%{REQUEST_FILENAME}​ ​!-f ​RewriteCond​ ​%{REQUEST_FILENAME}​ ​!-d ​RewriteRule​ ​.​ ​index.php

thecodeholic avatar Jan 11 '22 04:01 thecodeholic