简体   繁体   English

需要有关PHP和ASP .NET混合的帮助

[英]Need help regarding a mix of PHP and ASP .NET

I'm running a Windows Server 2008 for all my ASP .NET stuff. 我正在为我所有的ASP .NET运行Windows Server 2008。 Then I have some stuff which is still managed by WordPress as a CMS. 然后我有一些东西仍然由WordPress作为CMS管理。 For some reason, I believe that it's a bad thing mixing ASP .NET and ASP.NET files in the same domain (or subdomain), especially when talking about a huge project like Wordpress. 出于某种原因,我认为在同一个域(或子域)中混合使用ASP .NET和ASP.NET文件是一件坏事,特别是在谈论像Wordpress这样的大型项目时。

The thing is, right now we have a subdomain hosting a knowledge bank built from Wordpress with all the information we need. 问题是,现在我们有一个子域,托管一个由Wordpress构建的知识库,其中包含我们需要的所有信息。 However, where I work they want to change that to mydomain.com/knowledge instead of knowledge.mydomain.com. 但是,在我工作的地方,他们希望将其更改为mydomain.com/knowledge而不是knowledge.mydomain.com。 This adds complexity, since mydomain.com already contains ASP .NET files. 这增加了复杂性,因为mydomain.com已经包含ASP .NET文件。

I told them that this is probably not a good idea. 我告诉他们这可能不是一个好主意。 Yes, it'll work, but it's not pretty. 是的,它会起作用,但它并不漂亮。 What to do? 该怎么办? What are your suggestions? 你有什么建议?

I know this may be subjective, but all I ask is some pros and cons for mixing or not mixing up PHP and ASP .NET files in the same folder, and perhaps some alternative solutions to the problem . 我知道这可能是主观的,但我要问的是在同一文件夹中混合或不混合PHP和ASP .NET文件的一些优点和缺点,也许是问题的一些替代解决方案

Note IIS is what is running on the server. 注意 IIS是服务器上运行的内容。

First thing popping up to my mind, without much thought, is that you'll end up with added complexity (also from a mainteinance point of view) to instruct your web server(s) to properly handle and separate php from asp files. 在没有太多考虑的情况下,首先出现在我的脑海中的是,你最终会增加复杂性(从主观点来看),以指示你的web服务器正确处理和分离php与asp文件。 Having them interpreted by the wrong parser could cause quite a lot of issues; 由错误的解析器解释它们可能会导致很多问题; and possibly some security breaches (IE reveal source code, configuration details). 可能还有一些安全漏洞(IE显示源代码,配置细节)。 Moreover implementing this might be not so trivial, depending on how your filesystem is layed out. 此外,实现这一点可能不是那么简单,具体取决于文件系统的布局方式。

As for the pros of this solution, SEO purpuses is one I'm thinking of. 至于这个解决方案的优点,SEO purpuses是我正在考虑的。 I'm not an expert in the field, but I've read somewhere (a respectable source, anyways, which unfortunately I cannot recall right now) that keeping all (quality) content within same domain will strenghten domain authority. 我不是这个领域的专家,但我已经读过某个地方(无论如何,这是一个值得尊敬的消息来源,但我现在还记不住),将所有(质量)内容保留在同一个域内将会增强域名权限。

As an alternate solution , you might play with web server modules (or proxy in front of it), so to transparently redirect requests for one kind of scripts to the host providing such specific service. 作为替代解决方案 ,您可以使用Web服务器模块(或其前面的代理),以便透明地将对一种脚本的请求重定向到提供此类特定服务的主机。 You'd be giving the impression of servicing everything through a single host, whereas there'd be two separate hosts doing the (specialized) work. 你会给人一种通过单个主机服务所有东西的印象,而有两个独立的主机在做(专门的)工作。

If it's simply an issue of separation of files and folders, just map the URL to the folder. 如果只是文件和文件夹分离的问题,只需将URL映射到该文件夹​​即可。

I believe this can probably be done with Virtual Directory. 我相信这可能是通过虚拟目录完成的。 "The virtual directory name becomes part of the application's URL, and users can request the URL from a browser to access content in the physical directory." “虚拟目录名称成为应用程序URL的一部分,用户可以从浏览器请求URL访问物理目录中的内容。”

如果你有ISAPIRewrite或其他东西,你可以尝试一些URL重写,但这有点......凌乱。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM