Reputation: 55
I am using cppcms ver 1.2, and want to include external css and js files as follows: media/css/bootstrap.min.css But I get a 404 error for them, even though the files exist in the media folder in my root folder of the app.
I tried copying the media folder manually to the CMakeFiles folder. But that didnt work also.
Still keep getting a 404 error for localhost:8080/media/style.css or any of the other css or js files.
What is the document root of the cppcms, and if it is the root folder where the code is, then why isnt it able to read them?
My code is modelled on the examples/message_board sample.
Upvotes: 1
Views: 96
Reputation: 55
The problem was beig caused by the redirect in the config file which was redirecting everything to the root url. Added exclusion there for the media folder, and the message_board sample and my code worked.
Upvotes: 0