Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6094815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:43:25+00:00 2026-05-23T12:43:25+00:00

I am trying to implement some Apache rewrite rules to set the MIME type

  • 0

I am trying to implement some Apache rewrite rules to set the MIME type (in)correctly for XHTML in Internet Explorer. I have found these rewrite rules in many place, and they seem to work for most people:

  RewriteCond %{HTTP_USER_AGENT} .*MSIE.*
  RewriteRule .* - [T=text/html]

However, my site is already using Rewrite rules with the [P] flag to proxy requests to a local Tomcat instance. No matter what I do, the above rules seem to be overridden by the mime type returned from Tomcat. The Apache docs say for the [P] flag:

This flag forces the substitution part
to be internally sent as a proxy
request and immediately (rewrite
processing stops here)

…so I can’t put the mime rules after my proxy rules. If I put them before my proxy rules, the mime type is overridden by the proxy.

Is there any way to set the mime type for IE if I am using the proxy rules? Or is my only option to change the mime type in Tomcat (requiring a code change, unfortunately).

Thanks,
Jeff

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:43:26+00:00Added an answer on May 23, 2026 at 12:43 pm

    I’m not sure if this will work, you can try it. Apply two rules, one for IE and one for 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]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to implement unit testing and currently have some code that does
Im trying to implement some code i found on a website which duplicates a
We're trying to implement some sort of Chess game and we have defined an
I'm currently trying to implement some kind of file browser / explorer into a
im trying to implement some behaviors when a mapview element scrolls... by coding a
I'm trying to implement some retry logic if there is an exception in my
I'm trying to implement some basic linear algebra operations and one of these operations
I'm trying to implement some rudimentary tabs in a Cocoa editor I'm working on.
I am trying to implement some unit testing for an old framework. I am
I am trying to implement some interface changes in my app, based on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.