![]() |
|
General software and network General OS-independent software and network questions, X11, MTA, routing, etc. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
Hi!
I'm sure there are some real Apache geniuses here, so maybe you can give me some advice. I have the following problem: * I have an Apache 2.2.10 server fronting a web application running on Tomcat 4.0.5 via ProxyPass directives. * When I send a request to my web app directly at the Tomcat server it responds with content-type=application/xhtml+xml, which is what I want. * If I send the request to the Apache server it responds with content-type=text/html. Is there any way to configure Apache to respond with the corerct content type? Thanks! Regards, Markus |
|
|||
![]()
I'm not sure if this is what you are looking for, but anyway..
Code:
RewriteEngine on RewriteBase / RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0 RewriteCond %{REQUEST_URI} \.html$ RewriteCond %{THE_REQUEST} HTTP/1\.1 RewriteRule .* - [T=application/xhtml+xml] http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html http://www.ibm.com/developerworks/xm...tml/index.html http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html Also, you may want to have a look at the DefaultType directive in the httpd.conf file. Check out mime.types too. Good luck!
__________________
"I never think of the future. It comes soon enough." - A.E Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org |
|
|||
![]()
Hi,
I've considered the RewriteConds - but I don't quite understand how to use them for a proxypassed URL. I guess I'll have to read up on that. I've checked mime.types, and I think that they are set correctly - but I'll double check that. Also, I thought that mime.types only worked based on file extensions? The service I have does not serve "files", so the URL's have not file extension - for example Code:
http://<app-name>/index?param1=value1¶m2=value2 I'll check out DefaultType as well, I wasn't even aware that it existed. Thank you for the pointers! |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Big5 Character Set in Apache problem after upgrade to 6.4 | paul-lkw | FreeBSD Installation and Upgrading | 0 | 23rd February 2009 09:20 AM |
(Net|Open)BSD Make: implicit C header dependencies | taylor_venable | Programming | 3 | 25th November 2008 10:32 AM |
Problem with php and apache on OpenBSD | co_bofh | OpenBSD General | 10 | 27th July 2008 10:13 PM |
Apache Problem ( Permission ) | dctr | FreeBSD General | 8 | 27th May 2008 09:48 PM |
apache fd size problem | oxy | FreeBSD Ports and Packages | 0 | 10th May 2008 10:49 AM |