Tell me how to implement the opening of the file in the browser.

There is a web service with the extension WSDL

When opening links

http://mysite.ru/soap/test.wsdl 

The file is downloaded, but it is necessary that it opens in the browser as XML

How can I write .htaccess?

    1 answer 1

    Try changing the title when issuing the document:

     header('Content-type: text/xml') 
    • those. Additionally write php, to call the file with the substitution of the header? I get this direct link to the WSDL file (it has a structure like XML), regular XML opens in the browser, but the WSDL is a completely different story. - Alexander Zarifulli
    • in general, for the future for others who face this moment. I did the following: I added the following lines in the .htaccess file RewriteEngine On <ifModule mod_headers.c> # Регулярное выражения, по которому определяется применять ли правила <filesMatch "\.(wsdl)$"> # Добавляем/изменяем заголовок Content-Type Header set Content-Type "text/xml" </filesMatch> </ifModule> - Alexander Zarifulli