internet explorer - Apache Rewrite Override Mime and Proxy Request? -


i trying implement apache rewrite rules set mime type (in)correctly xhtml in internet explorer. have found these rewrite rules in many place, , seem work people:

  rewritecond %{http_user_agent} .*msie.*   rewriterule .* - [t=text/html] 

however, site using rewrite rules [p] flag proxy requests local tomcat instance. no matter do, above rules seem overridden mime type returned tomcat. apache docs [p] flag:

this flag forces substitution part internally sent proxy request , (rewrite processing stops here)

...so can't put mime rules after proxy rules. if put them before proxy rules, mime type overridden proxy.

is there way set mime type ie if using proxy rules? or option change mime type in tomcat (requiring code change, unfortunately).

thanks, jeff

i'm not sure if work, can try it. apply 2 rules, 1 ie , 1 non ie.

rewritecond %{http_user_agent} .*msie.* rewriterule ^(.*)$ http://localhost-tomcat:8080/$1 [t=text/html,p,l] 

second rule without browser detection

rewriterule ^(.*)$ http://localhost-tomcat:8080/$1 [p,l] 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -