使用PHP服务器运行的aspx请求 [英] make server run aspx requests with php
问题描述
我们正在创造一个房地产网站。全国连锁加盟网站想要给我们传递落在了当地searchs。该搜索必须遵循以下格式:
We are creating a real estate website. The National Franchise site wants to pass us searchs that fall in out local area. The searches MUST follow this format:
/propertysearch/findpropreties.aspx?q1=this&q2=that&q3=other
该问题是,我们已经建立了一个PHP的网站,购买Windows Server和学习ASPX似乎矫枉过正这一个脚本。
The issues is that we have built a site in PHP and buying a windows server and learning aspx seems like overkill for this one script.
所以...我想我需要做一个重定向,像这样的:
So... I think I need to make a redirect, like this:
RewriteRule /propertysearch/findpropreties.aspx$ http://texasmls.com/corpSearch.php [R=301,L,QSA]
不过,这是行不通的。
But it does not work.
在总结:
有谁知道如何欺骗服务器进入运行ASPX文件作为PHP?
我收到类似的请求 example.com/propertysearch/findproperties.aspx?this=Something
我想分析与PHP这个请求......
In summary:
Does anyone know how to trick the server into running aspx files as php?
I recieve a request like
example.com/propertysearch/findproperties.aspx?this=Something
I want to parse this request with php...
感谢您的帮助!
推荐答案
您已经标记的Apache2你的问题,所以这是Apache的方式:
You've tagged your question with apache2, so this is the Apache way:
在某处你的httpd.conf,特定地点的.conf文件,或的.htaccess,把这个:
Somewhere in your httpd.conf, site-specific .conf file, or a .htaccess, put this:
AddType application/x-httpd-php .aspx
这会强制Apache在运行通过PHP间preTER任何的.aspx。
This'll force Apache to run any .aspx through the PHP interpreter.
这篇关于使用PHP服务器运行的aspx请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!