Rasperry web server with CSS - raspberry-pi

I have a raspberry pi and i want to configure a web server on it. I already configure it, I can already see it on my domain, but the website doesn't read the CSS file.
P.S The path for the CSS file is right.
TY for your help.

Possible to give more information on what sort of web server you are using? Apache? But I'm just gonna assume your rig is the same as mine. Please use the following code in your HTML.
<link rel="stylesheet" type="text/css" href="/css_file.css">

Related

TYPO3 v9 admin panel without css styles and js

I have a problem with one of the TYPO3 installations on my server. The whole thing loads but without styles and js. Comparing the neighboring installation on the same server (which works properly), the difference appears in the file paths.
The correct path has a form:
<link rel="stylesheet" type="text/css" href="/typo3/sysext/backend/Resources/Public/Css/backend.css?1571297500" media="all">
In an installation where the whole installation does not work, the path has a form:
<link rel="stylesheet" type="text/css" href="/typo3temp/assets/compressed/backend-0ec6c1600f439ab982e3d6ab38b2463c.css.1574420118.gzip" media="all">
There is no such file in the specified location - only
backend-0ec6c1600f439ab982e3d6ab38b2463c.css
backend-0ec6c1600f439ab982e3d6ab38b2463c.css.gzip
If I remove the fragment 1574420118.gzip from the code, part of the styles is loaded.
The strange thing is that both installations have the same .htaccess file and still generate different code.
Any idea where the reason for this is?
The setting you are looking for is an installation-wide setting called versionNumberInFilename.
It appears you have this enabled in the broken install, but not in the working one.
You can change the setting under 'Admin Tools -> Settings'. If you can't get there, you can change it in your typo3conf/LocalConfiguration.php or typo3conf/AdditionalConfiguration.php file.

Github... Background image doesn't display when I publish my site on github

I'm a beginner in web Dev.. I have a website that displays properly on localhost but when I publish and try to render it on Github, the background image doesn't show up.. What can I do to remedy this
Can you post a bit of code for us to look at?
My guess is that you have the background image referenced absolutely on the computer, and it needs to be a relative reference to render when hosted online, but I can't say for sure without having some code to look at.
A link to your github project would also help.
Edit: It looks like you perhaps renamed your startup.css to style.css and forgot to edit the html header link from startup.css, to style.css
I.e. change
<link rel="stylesheet" type="text/css" href="startup.css">
to
<link rel="stylesheet" type="text/css" href="style.css">
Previous suggestion (no longer likely):
As you mention Windows, one possibility is that you have mixed up Capital and small letters somewhere in the filename or path.
Simple web-servers on Windows are often forgiving (as is Windows filesystem) of these mistakes, while internet is not-

favicon automatically download in browser

i am using favicon this code.
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
But favicon is automatically downloading in browser.
Please help us how can we resolve this issue..
My advice:
In the HTML declaration, use an absolute path (ie. /images/favicon.ico), to avoid any relative path issue.
Download the file manually (eg. download http://yourwebsite.com/images/favicon.ico) and open it with an image editor. This is to make sure that your web server really returns your favicon.ico file and not something else. When a file does not exist, some web servers are configured to return some content, such as a "Oops!" web page, instead of a plain 404 error. This can trick the browser.
When opening your page, enable your favorite web debuging tool (Firefox+Firebug, Chrome console...), select the Network tab to look at the HTTP exchanges and spot the access to favicon.ico. Check the Mime type: it should be image/x-icon (or maybe something similar). If you see something really suspicious, such as application/octet-stream, there must be something wrong on the server side.

How To automatically update resourse link in eclipse when files moved to other location

I have imported website template in eclipse using file->import->General->Archive File..Template contains html files and also resource folder which contains CSS Javascript etc.I want to put html file in user folder and resource files in user_resource folder. But the problem i get is eclipse doesn't automatically update links in html file to the resource file.Do i manually update all the links in HTML file or is there any way like dreamweaver to update the links when file get moved to other location? For example i have link
<link href="user/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
it should automatically update to
<link href="../user_resource/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
when assets folder move to user_resource folder.
Any help would be appriciated
I have not used dreamweaver much. But I find these links may be useful to solve the problem if someone know how to use dreamweaver.
Try it out...
http://www.whoi.edu/services/stad/classes/DreamWeaver/movingfilesfolders.html
http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7c3ea.html

Problem With HTML5 Application Cache Whitelist - Won't Ignore Items

I'm trying to use HTML5 Application Cache to speed some things up on an iPhone webapp. It works great for storing images, css and JS, but the problem is that it also tries to store the HTML. I haven't been able to get it to ignore the html and stop storing it in the cache. From what I've read, I have to "whitelist" the files and directories that I want to load no matter what. I've tried listing the files I want cached explicitly, and I've tried adding a series of things under the "NETWORK:" heading. I've tried
*
/
/*
http://mysite.com
http://mysite.com/
http://mysite.com/*
None of them seem to work. Is there any way to ignore HTML files by MIME-Type or anything? Any advice would be appreciated.
Ryan
P.S. Of course, my site is not mysite.com..I just used that for simplicity.
I've avoided this problem by NOT referencing a manifest in each page, instead I have the following within each page :
<iframe src="cache.htm"></iframe> - with styles to hide the iframe
inside cache.htm I have :
<!DOCTYPE html>
<html manifest="cache.manifest">
<head>
<meta charset="UTF-8">
<title>Main Cache Resource</title>
</head>
<body></body>
</html>
based on previous tests and discussions with people in the html5 "ecosystem", each html-page that specifies a manifest is automatically cached as well.