Check out http://fube.ca in any browser but Firefox and you'll see that the cloud logo is a custom glyph font. In Firefox, though, the font won't load.
As best I can gather, the problem is that I'm serving the font from a subdomain and Firefox has strict requirements about the serving fonts from the exact same domain as the site. Apparently I can get around this by making a change to my .htaccess file, but the recommended changes don't seem to be working. See https://www.fontspring.com/support/troubleshooting/webfonts-are-not-loading-in-firefox and http://enable-cors.org.
Based on what I gather from these, here is what my .htaccess file currently looks like:
AddHandler php-stable .php
Header set Access-Control-Allow-Origin "*"
The first line was already there. I added the second (blank) and third lines. What am I doing wrong?
Actually, it turns out that my changes to .htaccess didn't save somehow. Adding that line to .htaccess does fix the problem.
Related
I would love it if my Perl script can change the address in the browser. Not to try and hide things, or be funny. But for cleanliness sake.
www.example.com/billing
looks much better than:
www.example.com/cgi-bin/billing.pl?userid=0000&inv=1234
I realize browsers probably have high security measures to prevent phishers from being more tricky, but what gives me some hope that this is possible is that I placed the following line in my .htaccess file:
ErrorDocument 404 /index.html
and if I go to www.example.com/nonexistent the browser will go back to the main page, but the address bar still has the nonexistent address.
Thanks
I want to remove numbers on the end url in specified folder, using htaccess.
(Numbers and minus sign befor numbers). For all urls in this folder.
For example
http://www.example.com/music/new-track-released-52
or
http://www.example.com/music/helo-there-4
Need to look like
http://www.example.com/music/new-track-released
http://www.example.com/music/helo-there
For all links in folder music
(I'm already removed php extension with htaccess)
How to do that?
Probably something like this:
RewriteEngine on
RewriteRule ^/music/(.+)-[0-9]+$ /music/$1
Note that this is the version for the host configuration. For .htaccess style files this has to be slightly modified. Whenever possible you should prefer not to use .htaccess style files but the real host configuration instead. Those files are notoriously error prone, hard to debug and really slow the server down.
code below doesn't work my .htaccess file. I mean, after this code is applied, I can still index folders in html.
# BEGIN disable folder index
Options All -Indexes
# END disable folder index
however, code below works. I mean, after this code is applied, server gives 403 if I try to index a folder which I know that it exists.
Options All -Indexes
I'm on a shared hosting and have nothing to do with server config. .htaccess is created via notepad++ with encoding setting UTF-8 without BOM. .htaccess permission is set to 0644. there exist no other code in .htaccess.
what does this situation mean? what am I doing wrong?
Ok, looks like my original comment above pushed you into the right direction:
Most likely this is a problem with the line breaks. So that for the
interpreting part of the http server that "Options" line is not on a
separate line, thus also commented out. Check your line ending
characters by using a hexeditor. That s the only reliable tool to do
so.
I'm creating a web app that has a list of several .dwg files (These are AutoCAD drawings FYI).
I have an image of a .dwg icon that when clicked is supposed to download the .dwg file. This works in every other browser except IE 10. IE 10 just displays a blank page when the link is clicked, and the url displayed is that of the correct .dwg file. I'm assuming IE 10 is trying to open and display this file much like it would a .pdf, but I'm not certain of this.
I'm using xampp to access the page, and I've tried configuring the .htaccess file to do a force download of .dwg files but to no avail. My .htaccess file is below. I'm new to configuring .htaccess files, but from what I've been reading this is the proper way to do a force download.
AddType application/acad .dwg
AddType application/octet-stream .dwg
#Note that this is my entire .htaccess file
I tried this without the "application/acad .dwg" line at first, then I tried adding the MIME type but that did not work either.
I think it is worth noting that, as a test, I tried to force download .pdfs using the method above. This did not work either.
So I also tried looking in the httpd.conf file to see if there was a module that was commented out I could use, however, the instructions in the file told me not to mess with anything unless I knew what I was doing. I'm pretty new to this, so I looked through the modules for something obvious but couldn't find anything.
So my question is: How do I get these files do download in IE 10?
Other things to note:
The files are downloaded by every other browser I've tried. (I have access to a machine with IE 8 and even that downloads the files)
I do not have any browser extensions from Autodesk that would interfere with this. (The only non-out-of-the-box extension I have is avast! WebRep, however, this is on all other browsers as well.)
All .dwg files are not corrupted and perform normally.
Probably most importantly, my .htaccess file is working and is recognized. To test this I typed in junk text, saved it, then received a 500 error when I tried to reload the page.
I would like my Web page
http://www.gmarks.org/math_in_e-mail.txt
on my Apache 2.2.14 server to display correctly in all browsers on all platforms (or something approaching this). I have included the line
AddDefaultCharset utf-8
in the appropriate .htaccess file. I find, however, that on my own machine, running Ubuntu 10.04, the page displays exactly as I would like only in the Google Chrome browser. Problems in other browsers: in Opera the last two lines do not display, in Firefox the subscripted aleph’s are too small, in rekonq the last two lines display incorrectly with various Fraktur characters repeated and others not displayed, in Midori the Opera and Firefox problems both occur, in Arora the Firefox and rekonq problems both occur, in Epiphany the Opera problem occurs.
Is there something else I could put in my .htaccess file, or some other configuration I might set up, to get that Web page to display correctly everywhere? I suppose I must rely on the font set each user has installed on his or her computer (obviously it defeats the purpose of the Web page to use something like GIF images). I find the differences among the browsers strange: does each browser include its own set of fonts in some configuration file, or do they access some directory containing fonts for the entire computer? (And is the answer to the last question OS-dependent?)
Further questions: would I do better to change the line in my .htaccess file to
AddCharset UTF-8 .txt
and is there a way I can make the .txt file display by default with an increased font size?
A browser will not know the text is UTF-8 encoded unless the text starts with a UTF-8 BOM (assuming the browser even looks for that) or the HTTP Content-Type header specifies UTF-8 as the Charset, ie: Content-Type: text/plain; charset=utf-8. If AddCharset tells Apache to generate that attribute for .txt files, then great.
There is no way to specify a font for a .txt file by itself. You have to use HTML for that. To specify a font for a .txt file, you would have to write a server-side script that outputs an HTML wrapper around the .txt file content and then sets the HTTP Content-Type header to specify text/html instead of text/plain as the data type.