W3C Error: X-UA-Compatible HTTP header must have the value IE=edge, was IE=Edge,chrome=1 - w3c-validation

I have this error from W3C Tool...
I changed my code from
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
to
<meta http-equiv="X-UA-Compatible" content="IE=edge">
but the tools still show me the same error message...

I found the solution...
I must change this in .htaccess file too...

Hum, I have changed it in the HTML files but doesn't work, When I fixed it in .htaccees file it works, very strange :)
Old code:
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=Edge,chrome=1"
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webm|webp|woff|xml|xpi)$">
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
New code:
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=Edge"
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webm|webp|woff|xml|xpi)$">
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
And everything is working perfect now :)

Related

DocC index shows a blank page when using MAMP

I am trying to perform a POC for the company I work to see the potential value we can get by using DocC in our project.
Before my development, I saw the 4 videos related to DocC from WWDC 2021, visit Apple developer site and read some pages and blogs to gather some information and thoughts.
For my development, I started using MAMP on my dev machine before pushing the work to the server.
So far, I think I have done all the necessary steps to host the doccarchive on the website. However, I wonder if I have missed something as my index.html looks blank.
The code I used is:
index.html (main)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DocC POC</title>
</head>
<body>
<h2>Welcome</h2>
<button onclick="location.href = 'documentation/index.html';" id="myButton" class="float-left submit-button" >Read data framwework documentation</button>
</body>
</html>
.htaccess
# Enable custom routing.
RewriteEngine On
# Route documentation and tutorial pages.
RewriteRule ^(documentation|tutorials)\/.*$ Data.doccarchive/index.html [L]
# Route files and data for the documentation archive.
#
# If the file path doesn't exist in the website's root ...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# ... route the request to that file path with the documentation archive.
RewriteRule .* Data.doccarchive/$0 [L]
File structure
Picture prooving that the doccarchive is not empty
Picture of blank page
Any ideas??
I was able to try it on github pages and was showing blank until I used the path {base path}/documentation/{project name}
so in your case try to replace index.html with your project name

How to access public folder in laravel 4?

I was trying to add some styling in my localhost(wamp) lavarel project....
This is my style.css file located in public folder
p{font-weight:bold; size:20px; color:red;}
This is hello.blade.php file located in app/view folder
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="{{ URL::asset('style.css') }}">
</head>
<body>
<p>Test</p>
</body>
</html>
& My routes.php file is having following code:
Route::get('/',function(){
return View::make('hello');
});
.htaccess file located in root directory is
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
When I am trying to access that hello page by localhost, Test content is visible without any styling. Can anyone tell me what is going wrong with me??
Your directory structure is different from the default one shown here
You have to put the packages folder and these files into the public directory:
.htaccess
favicon.ico
index.php
robots.txt
Then to make your site work again change the document root of your apache server to path/to/application/public
There's a reason for the public directory. When you put it on a server on the internet you gain additional security because the user can only access what is in the public directory. (because the domain is pointing to this folder) If you use your current setup everybody could see your whole application. For example one could enter example.com/app/config/database.php and would see your database password.
Put it like this:
<link rel="stylesheet" href="{{ asset('style.css') }}">
Without URL::

icoMoon fonts doesn't show-up on Firefox

Haven't some issues with the cross-browsers with the icon replacement fonts on Firefox, currently only show-up the content text but not the icomoon text replacement. Source code shown from code Sass + Magento + .htaccess, any idea or help would be much appreciated.
Website:
http://www.phoebessecret.co.nz
Had done .htaccess rewrite:
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Origin "http://www.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://skin.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://js.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://media.phoebessecret.co.nz"
</IfModule>
</FilesMatch>
CSS:
#font-face {
font-family: 'topshops';
src:url('../fonts/topshops.eot');
src:url('../fonts/topshops.eot?#iefix') format('embedded-opentype'),
url('../fonts/topshops.svg#topshops') format('svg'),
url('../fonts/topshops.woff') format('woff'),
url('../fonts/topshops.ttf') format('truetype');
font-weight: normal;
font-style: normal;}
.icon-fonts {
font-family: 'topshops';
font-style: normal;
speak: none;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-weight: 400;
}
.iconsearch {
content: "\61";
}
Try to add this to your .htaccess file.
It should fix your issue. It fixed mine.
<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
I was having issues with icomoon and Firefox as well. Have you tried Paul Irish's 'bulletproof' #font-face syntax? It's a little different than what icomoon outputs and I've had better luck with it - no FF issues since.
#font-face {
font-family: 'Graublau Web';
src: url('GraublauWeb.eot?') format('eot'), url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf') format('truetype');
}
I had the same problem (with a Wordpress installation), icomoon icons were not showing in Firefox. Chrome, Safari, IE worked fine.
After the Site was up and running, the client asked me to include www to the url, instead of just http://. So I changed the blog Adress, but not the Wordpress Adress (in the Wordpress Dashboard). Suddenly all Icomoon Icons were gone. After adding www to the Wordpress address, the icons were back.
There are two things you may try. I used both and it worked for me.
Use full links in in your CSS file to reference icomoon. Your .htaccess may be rewriting the URL. Secondly add the following in .htaccess file just as webkub pointed out.
<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
If you're running IIS, you'd want to modify your web.config and probably add the httpProtocol section as shown below:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

HTTP cache headers with .htaccess

I am trying to configure my .htaccess file to set the cache time. Tryied every possible configuration but nothing works!
This is what is written in my HTML:
<meta http-equiv="Cache-Control" content="max-age=2592000, public" />
<!--
<meta http-equiv="expires" content="mon, 24 sep 2012 14:30:00 GMT">
-->
and this is what written in my .htaccess file:
ExpiresActive On
ExpiresDefault A3600
However, when I refresh inclusind cache clear (ctrl+F5) in firefox, my firebug NET panel says that the cache expires at the same second I have accessed the file ( and not in the future, as I want it to be).
What am I doing wrong??
Thanks
I advise you to use headers mod. You can activate it (if disabled) with this command :
a2enmod headers
Here is a simple code example that works:
<IfModule mod_headers.c>
# WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
# WEEK
<FilesMatch "\.(js|css|swf)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
</IfModule>
max-age is cached time in seconds.

Css and javascript not loading with rewrite condition? [duplicate]

This question already exists:
Closed 11 years ago.
Possible Duplicate:
Css and javascript Not Loading in rewrite rule
After using only rewrite rule
RewriteEngine On
RewriteRule ^profile.php$ profile.php
and when i load profile.php the css and javascript are loading
but when make a change in rule and add condition
RewriteEngine On
RewriteCond %{REQUEST_URI} !/profile.php$
RewriteRule ^profile.php$ profile.php
and then the js and css are not loading
Coding of profile.php is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-…
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link rel="stylesheet" href="http://localhost/css/profile.css" />
</head>
<body>
<table><tr><td><div class="image"><ul><li>My</li></ul></div>
</td></tr></table>
</body></html>
it's because the RewriteCond says : apply the followingRewriteRuleonly if the url doesn't only contain /profiles
you should write it like :
RewriteCond %{REQUEST_URI} /profile.php$
(without the exclamation mark)
in add:
If you don't want your mod_rewrite Rules to be apply on scripts and other specific files request, you should write a Rule for them.
E.g.
RewriteRule \.(css|jpe?g|gif|png)$ - [L]

Resources