Handling text/xml via php

software development

#1

I’m trying to make a page I can use to troubleshoot an Exchange Web Services application. A basic connectivity test sends a web request with mime type of text/xml.

I have a php file at the host that I want to receive this request.

I am finding that dreamhost does not direct my request to my php file. When I use a web browser and just load the page, it comes back fine. But when I try pointing my Exchange Client to my page, it sends a POST with type of text/xml. Dreamhost sends back an error 301 saying it is permanently redirected, giving the same url, but with a text/html type.

How can I direct requests with type text/xml to go to my php code? I have looked through examples for .htaccess settings and php.ini settings and can find nothing.

Note: please read carefully before answering. I did find that MANY people are apparently using .htaccess to direct apache to treat xml files as php. That is not what I am trying to do. I do not have an xml file. I have a POST with post data of type text/xml. This is part of why it is so hard to find an answer in google. Everyone else using the same buzzwords are doing something different than what I want to do.


#2

Is it possible the 301 is due to redirection from www <-> non-www ?


#3

That’s probably it. Yesterday I got past this, without knowing why.

That would explain why I can’t find anything online about the problem I thought I was having.

Thanks for the reply.


#4

Yeah, we click a button that doesn’t change anything in a place we can see, then when problems like you mention above crop up 6 months later it makes troubleshooting all the more difficult.

It’s a Feature! :slight_smile: