So i just did a test using one css file and the .htaccess file, i removed all of the offending css php section in the css file and i lost all css formatting as a result, the least amount of code that would allow the page to properly display the css was this:
AND i had the .htaccess file in place with only this line:
AddHandler application/x-httpd-php5 .php .html .htm .css .js
I have nothing setup apart from defaults in DH web panel, i use gmail/google services but as they are on separate servers there is nothing that should be at play there.
Appreciating your efforts btw.
sXi, yes mate, i set up the google mail services, but as i just explained to bobocat, it shouldnt bear any relevance as the gmail services et al are hosted on a seperate server with nothing but dns settings to point to them.
[quote=“ziller, post:6, topic:59031”]
So i just did a test using one css file and the .htaccess file, i removed all of the offending css php section in the css file and i lost all css formatting as a result
if i removed either line from EITHER file from therein i lose all css formatting on my resulting php page.[/quote]
Samples? CSS does not need need anything special such as that or else static sites wouldn’t even work.
I was referring to the pagespeed option crappery. But anyway your problem is that someone’s set PHP to handle everything via the htaccess directive. You should really remove that entire line unless you have an ultra-specific use for it.
You either have another .htaccess somewhere in your directory tree which still has the same command, or you have a framework which is intercepting all requests and sending your files as html. Your css is still being sent as text/html:
The problem is (probably) your ‘php’ pages have an html extension. You use AddHandler to tell apache to treat those as php. That’s all you need. You don’t want to run your css and js through php as well. Your original ‘solution’ is not a solution at all. It’s a kludge that obfuscates the problem, which is why you needed to add php code to all of your css and js to make anything work. That’s not a solution at all.
Can you explain what you mean by “The problem is (probably) your ‘php’ pages have an html extension.” ? You mean the .php pages have html within them? As i say, if i remove EITHER the addhandler OR the code in the external css file, no css is rendered
Up until this i had used php with embedded html on other servers and never had to use an addhandler to get css or js to work, this is what leads me to question the Jets server config.
I realise it was always a kludge, but i found it on DH forum a long time back and it helped thus far but i need to clean this up, so, here i am lol I do appreciate (both) your efforts though.
Yes, i have done this numerous times, but the css does not render, otherwise i would never had needed the kludge.
I just renamed the .htaccess file to 11111.htaccess and both the index.php and index2.php files fail to render css, one file has the php code block in it, the other does not, as per our earlier samples, but both fail to render.
But i also made a basic.php version of the html code you supplied, and without the addhandler i am (naturally) prompted to download the file, not display it.
[hr] http://residentkennedy.com/blogg/basic.html and the basic.php file is there also