.htaccess - Icons missing on Azure Wordpress site -
i created wordpress azure website through azure websites gallery. installed theme called bridge.
everything working quite fine...except, have no icons appearing on desktop version of site (through chrome, firefox , ie). seeing icons on windows phone. not seeing icons on desktop site when squeeze window downwards mobile phone size.
to give background problem potentially coming from… have used custom domain. create wordpress site work custom domain, have added code wp-config.php file:
/*emma added below prepare permalink custom domain*/ define('wp_home','http://examplesite.com'); define('wp_siteurl','http://examplesite.com);
the code above meant 1 time clicked on post or page , moved away homepage, url still examplesite.com/pagename instead of examplesite.azurewebsites.net/pagename.
so icon issue…
the icons displayed through using font (font-awesome exact). have latest updates of theme , latest 4.2.0 version of font in font files. font files can found here in site:
wp-content > themes > bridge > css > font-awesome > fonts
i asked bridge theme team why icons not displaying. replied:
this happening because of cross-origin access denied site. should paste code htaccess file located in wp installation directory:
<ifmodule mod_headers.c> header set access-control-allow-origin: http://examplesite.com </ifmodule>
i not have .htaccess file because site running on azure. understand .htaccess files linked apache. instead of .htaccess file, have web.config file , web-config.php file because installed azure.
i created .htaccess file in root of website , pasted above code. of course of study didn’t work. looked how write web.config version of code , pasted web.config file , did not work (although little knowledge of area, syntax wrong) , didn’t work. see code below:
<httpprotocol> <customheaders> <add name="access-control-allow-origin" value="http://examplesite.com" /> </customheaders> </httpprotocol>
i added web.config file , hasn't worked:
class="snippet-code-html lang-html prettyprint-override"> <remove fileextension=".svg" /> <remove fileextension=".eot" /> <remove fileextension=".woff" /> <mimemap fileextension=".svg" mimetype="image/svg+xml" /> <mimemap fileextension=".eot" mimetype="application/vnd.ms-fontobject" /> <mimemap fileextension=".woff" mimetype="application/x-woff" />
i have read need alter buildaction "content", not sure how when click properties of files such .woff, don't seem option.
i played around adding web.config.php file under custom code wrote domain work, didn’t work either. 1 time again, not sure code correct.
i went back upwards team @ bridge theme , said should contact hosting provider me because .htaccess can’t work on type of server.
so, not quite sure do.
does know right code should set web.config, web-config.php or other file? or, there issue here not understanding? perhaps simple adding custom css phone call font?
i wonder if there clue in statement made above... "everything working quite fine...except, have no icons appearing on desktop version of site (through chrome, firefox , ie). seeing icons on windows phone. not seeing icons on desktop site when squeeze window downwards mobile phone size."
if can see them on phone, certainly means @ point icons beingness rendered correctly?
i have had through css files alter in way site rendered through media queries, didn't find there either.
after many hours of searching solution found post: windows azure cdn , *.woff fonts
i copied code web.config file kid of system.webserver:
class="snippet-code-html lang-html prettyprint-override"> <httpprotocol> <customheaders> <add name="access-control-allow-origin" value="*" /> <add name="access-control-allow-methods" value="head,get,options" /> </customheaders> </httpprotocol>
that seemed solve it! :)
have tested in chrome, firefox, ie , mobile , icons showing. magic!
wordpress .htaccess azure web-config font-awesome
No comments:
Post a Comment