Failed to load resource: fontawesome-webfont.woff2 Laravel 5.5 - vue.js

I am writing a web application and trying to use font-awesome icons.
The fonts are imported to the right directories but when I load the page the icons appear as blank squares. (Example in attached picture).
When I press F12 this is the error I get: (Also in attached picture)
Failed to load resource: the server responded with
fontawesome-webfont.woff2 a status of 404 (Not Found)
Failed to load resource: the server responded with
fontawesome-webfont.woff a status of 404 (Not Found)
Failed to load resource: the server responded with
fontawesome-webfont.ttf a status of 404 (Not Found)
Those files do exist and I can see them.
I managed to find some solutions by changing the web.config file but this is not helping with laravel.
I can't find any appropriate solution for laravel 5.5 online. Would appreciate help!
PS - I don't know yet if this is relevant, but I use the icons in vue.js components.

IIS will not serve files of unknown type.
In IIS, go to MIME Types.
Right click in a blank area and select Add.
File name extension: .woff2
MIME type: font/x-woff
Click OK

Related

Problems with gif files in apache web server

We have an Apache Webserver, Version 2.4.12 on a Windows 2008 machine.
We have gif images in different sub folders of htdocs, some in "icons" and some other in "ni5/customer/images".
When I start our web application, the Google Chrome developer tools show something strange:
The one gif image from "ni5/customer/images" is loaded and the type is "gif", the other gif image from "icons" is NOT loaded and the type is "text/html".
When I open the second one with a image viewer, it is recognized as "gif".
The second image is not found on the server on that location or under that name.
It results in a 404 not found error(that's why the 404 response code is there).
The 404 not found response is usually always a text based response served from the defined error pages.
Just make sure you have the path and filename correct. Might be the result of a simple typo.
It was a name conflict!
I typed in the browser "http://localhost/icons/aktansicht3.gif" and found nothing.
Then I change "icons" into "icons2" and typed
"http://localhost/icons2/aktansicht3.gif" and it was found.
In Apache conf there was the entry:
Alias /icons/ "C:/xampp/apache/icons/"
So the "icons" directory was redirected to another location.
Now the alias is deleted from the conf and everything works.

WordPress migration: Font awesome icons do not show work

I'm going to migrate the site http://www.thetrekkr.com (from a friend) to another server. The current server does have problems, until I migrate the domain I made a subdomain which is http://www.thetrekkr.pd-design.at. Everything works except the themes (Avada) icons - this must be font-awesome-icons. The icons are working in Edge but not in FF, Chrome, Opera.
I tried the following ways to fix the problems:
Change the links in the database to the new subdomain (plugin better search replace)
adding a .htaccess file to load the icons (https://theme-fusion.com/knowledgebase/are-your-font-awesome-icons-or-custom-fonts-not-showing-up/)
adding the following code in the functions.php to load stylesheets or scripts (WordPress site migration - icons missing)
changing many times from www without www etc.
deleting browser cache, trying on more devices
Unfortunately nothing helps.
Update
I notice I am getting these errors in my network tab. Are they a problem?
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.thetrekkr.com/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.thetrekkr.com/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.ttf. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
I had the same problem but the solution I found was simple in the end.
Go to theme options -> advanced -> dynamic css/js and then disable file caching, that worked for me. You can also reset the cache on this page.
Thanks
Jamie
I had a similar problem, This is How I fixed missing awesome fonts after migration
I migrated my client's website from MAMP to hostgator using all in one migration but after the migration, all of the avada awesome font wouldn't show (front end and back end) after hours of trying to fix I finally found a solution.
Within the wordpress theme dashboard navigated to > Theme options > Advanced > Theme features > FontAwesome then re-selected every font awesome option then hit save.
I could now select all the font again :)
It looks like you have a hardwired domain in your temporary site. The errors are an attempt to load assets from one site into another, and unless the remote site permits that explicitly, the browser will disallow it for security reasons. As the error indicates, if you wanted this configuration long-term, you can get the remote to allow it using the Access-Control-Allow-Origin header.
However, since this configuration is an accident of using two domains, it would be better to modify your site code to get these fonts to load from a relative path starting from /, rather than referencing the domain explicitly.
Go to Avada > Options > Advanced > Theme Features and check if the Font Awesome v4 Compatibility option is turned On. If not, turn it on and click Save Changes. And If it's already on then turn it off and turn it on again then click save changes.

static site hosting on S3 - 404 errors on files that show in S3 management console

I'm hosting a site using S3. Until recently, no problems. Last week, I uploaded some new .html files, and all of these new files result in a 404 error, while older .html files load with no problems.
I can see the new files in the S3 bucket using the web interface. When I compare permissions and any other settings for the new vs. old files, I'm not able to see any difference. When I view the properties of a new file, the provided link works (none of my images or CSS loads, however). Also, I can get the file to load using the bucket's endpoint. But, when using our custom domain name, all new files fail to load, with the following error:
404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: test1/s3a-debug.html
RequestId: 2573FF0356xxxxxxxxxx
HostId: qYnv8alWnV/xxxxxxxxx/xxxxxxxxxxxx+NPkHLO8arfTVizUds=
I'm at a loss to explain why recently uploaded files throw a 404, and yet older files that look identical load just fine. I've seen other people report similar problems, but I've yet to find a thread with a solution.
any help would be greatly appreciated. Thanks!
Go to S3 bucket properties -> Static web hosting and add index.html as Error document.
It considers everything as directory once you append something to host URL. Now after adding index.html as Error document, when it doesn't find the required path as a folder, it will go to index.html and redirect your request.

Image available on server but failed to load the given URL

I have a scenario that the image is available on the server on the said path
the whole system is running on apache with https (ssl installed and configured properly)
In my application when i generate the path and assign the same to the output (Html) it dose not show the image. Infact it says like the resource could not be loaded. But the same code works on local and many other server but on this 1 server.
Secondly if i do a view source on the same, copy the url and open the same url in browser - it opens up properly - without any issue / trouble but cannot find the same into the out generated by the app..
Any clue as why such thing should be happening??
Sorry my mistake - i realized those were tagged under folder ads and were blocked by ad block plus. Got the resolution :)

HTTP 404 file not found error even the file exist in the webserver IIS6.0

I am having files in the server to be available for downloads. I am using IIS6.0. When I try to download the pdf file it say Http 404 file not found error. But I am having the file in the server. While googling I found we need to enable the mime type. can any one explain me what is it and get rid of this problem
This is easy enough to sort out
To enable globally on the all site hosted by this IIS instance
Open IIS Manager
Right Click the server name
Select properties
Click the MIME Types button
Click New
Extension is .pdf
MIME type is application/pdf
To add it only to a single site on the IIS instance
Open IIS Manager
Right Click the sites name
Select Properties
Choose the 'HTTP Headers' tab
Click the MIME Types button
Click New
Extension is .pdf
MIME type is application/pdf
Open Internet Information Service(IIS) Manager
Right click on your website
Select HTTP Header tab
You will find button to add MIME Types
This link might be helpful to you.
You will find help in the Microsoft Knowledge Base: http://support.microsoft.com/kb/326965