开发者

IIS Host Headers using PHP

开发者 https://www.devze.com 2022-12-19 05:43 出处:网络
I\'d like to add Host Headers to an IIS from PHP. Is there a way to access the metabase from P开发者_如何转开发HP or do I have to write a .NET command line tool and then invoke it from PHP?

I'd like to add Host Headers to an IIS from PHP. Is there a way to access the metabase from P开发者_如何转开发HP or do I have to write a .NET command line tool and then invoke it from PHP?

Here's the background for the question. I have a Wordpress MU installation on Windows 2003/IIS6. The only way the setup will support subdomains (blog.mainsite.com) is by adding each subdomain to the site's Host Headers setting. Doing this manually every time a new subdomain is created is tedious and error prone, so I'm looking for a way to have it done through code.


I've been down this road with PHP in the past and eventually ended up shelling out to either VB script or .NET console apps.

David Wang has a handy script that allows you to add/remove new host headers individually (which you can't do using adsutil.vbs).

How to manipulate (insert/replace/remove) list data type in IIS configuration (David Wang)

0

精彩评论

暂无评论...
验证码 换一张
取 消