Custom headers

I'd like to 'cheat' and add a custom header via htaccess to address the new IE8 compatability mode...but it seems that I need to alter the httpd.conf file instead:

Code:
Uncomment (or add)  “LoadModule headers_module modules/mod_headers.so†
and add
<IfModule headers_module>
Header set X-UA-Compatible: IE=EmulateIE7
</IfModule>

I tried an htaccess version of this...but I never got it to work. Anybody else ever attempt this? Since it's something I may do across many domains I was hoping it was something I could do, instead of submitting tickets for every domain!
 
This option isn't enabled now, the linux team will evaluate if this is something we can add or not.
 
You're on Linux, so perhaps you're using PHP. My thought is, can you set the header in some include file that is part of every page? It would have to be output before other content of course.

Just a thought.
Tim
 
This option isn't enabled now, the linux team will evaluate if this is something we can add or not.

Just to clarify - are we talking about the ability to request changes to httpd.conf or the ability to insert custom headers?

Also, is this available on Win servers?

You're on Linux, so perhaps you're using PHP.
Sadly it's just a BUNCH of html docs...I was looking for an easy way out, especially since it will probaly have to be done across many domains.

I just LOVE IE!!!!! X(
 
Just to clarify - are we talking about the ability to request changes to httpd.conf or the ability to insert custom headers?

Also, is this available on Win servers?


Sadly it's just a BUNCH of html docs...I was looking for an easy way out, especially since it will probaly have to be done across many domains.

I just LOVE IE!!!!! X(


Win Servers, no.

Linux servers, talking about the ability to insert custom headers, not ability to request changes to httpd.conf, that doesn't change much :)
 
Again, on Linux, add the following to your .htaccess

Code:
AddType application/x-httpd-php .html .php

Now, .html files will be treated like .php files (processed by PHP).

Create a file called header.php

PHP:
<?php
header('X-UA-Compatible: IE=EmulateIE7');
?>

Then, edit each of the files to add this block at the very beginning:

PHP:
<?php
include('header.php');
?>

Then again, if you're going to go to all that work, why not just edit your files and stick this in the <head> section:

Code:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

(You could do a search & replace on <head> or </head> to automatically stick that meta tag in all your files...)
Tim
 
Yeah - I was hoping for the super easy 'drop an .htaccess file and be done' solution...which lead to httpd.conf....which basically lead back to editing all the files. Bummer....

The domain that prompted all this is a really messy site that's spread across many subdirs with a really awful number pages....it's a mess I inherited from another "web" design company. I'm guessing my next step in looking for the 'lazy' solution is to find the best find/replace/sync editor/ftp program!

Thanks for your insight though....any chance you read my other thread on stats/abuse? It was related to various php photo galleries (Coppermine and Gallery2) - since you seem to be very php proficient I thought you might have some insights?
 
I read your other thread, but not sure how to answer, as I would need to see some logs etc, seems a bit weird but I am sure there is some explanation.
 
I read your other thread, but not sure how to answer, as I would need to see some logs etc, seems a bit weird but I am sure there is some explanation.

I posted a possible explanation over there - I'm really just looking to STOP the traffic!

Side note - I had a friend check out these forums. He was amazed at the openness, honesty, and helpfulness around here. His hosting company is a nightmare when it comes to getting info - never mind trying to actually get some help!

Thanks!!
 
Side note - I had a friend check out these forums. He was amazed at the openness, honesty, and helpfulness around here. His hosting company is a nightmare when it comes to getting info - never mind trying to actually get some help!

Thanks!!

Some people like it, some people don't, I rather like it, sometimes it adds to me personal stress level but such is life and work :)
 
Back
Top