[solved]pie not working anymore (strange path issue)
Hi all, i had a strange issue, that now seems solved
in the end, it was a path issue so quite "known" but i ended up with a solution i didn't find anywhere here or on the web, so i'm reporting it if it can help you, just in case...:
yesterday i experimented PIE.htc on apache/php server and it worked great!
i used a syntax like
that setup worked.
with this syntax in that CSS file for loading PIE
border-radius:8px; behavior: url('../js/PIE.htc');
since the html file is in a subfolder of the docroot.
then i worked a way to load PIE.htc for different php files that are loaded from different folders (i have to adapt vith PHP their imported CSS files to load PIE.htc from a "js" folder with the right path to that folder, btw, so i use php to write the right CSS "url" pointing to the correct path to PIE.htc for every file served..).
since yesterday i also restarted the apache server a few times and modified its vhost conf because i was (am) having issues with logs rotation, and today... PIE was working no more!
i investigated all the issues, double-triple checked pats relative to the html, the server was serving htc fine, but added the "AddType text/x-component .htc" anyway.. nothing.
then i tried to put PIE.htc in the same folder of the html file and using, just to check if the path was an issue...
and it worked AGAIN.
border-radius:8px; behavior: url('PIE.htc');
At this point i was sure that it was a path issue, and tried
> every possibile combination of relative paths and slash/backslash: (like './js/PIE.htc', '../js/PIE.htc', '.\js\PIE.htc', '..\js\PIE.htc', 'js/PIE.htc', 'js/PIE.htc') - absurd, but just because nothing else was working anymore
> different styles of quotes (none, single, double)
then, as a colleague of mine suggested, as last resort, i tried to double the slashes in that path and suddenly ZAP! it worked again.
so if everything else fails, try something like this
border-radius:8px; behavior: url('..//js//PIE.htc');
it may solve your "absurd" path issue...
just to be some more absurd, this syntax also works here...
border-radius:8px; behavior: url('../js//PIE.htc');
border-radius:8px; behavior: url('..//js/PIE.htc');
i.e.: it seems that - at least - one slash must be doubled... i know it sounds crazy but it works like that. Maybe it triggers something in server or ie that makes IE find the behaviour file and use it properly...