试图重写一个基本网址,例如http://beta.mydomain.com到http://beta.mydomain.com/cms/index.cfm/new-home,但希望浏览器显示基本网址而不是cms网址。
我在isapi httpd配置文件中尝试这个:
RewriteRule ^$ /cms/index.cfm/new-home [NC,L]
但它只是重定向到http://beta.mydomain.com/cms/index.cfm/new-home这是正确的,除了浏览器必须显示http://beta.mydomain.com/而不是cms部分。
我们正在使用安装了isapi模块的IIS 6。这是我唯一知道的服务器(但我有权访问服务器)。那可能吗?如果没有,那么我还有其他选择吗?
我有一个想法:在iFrame中加载http://beta.mydomain.com/cms/index.cfm/new-home。
例如,如果某人浏览到基本URL,即http://beta.mydomain.com/,则在iframe中加载http://beta.mydomain.com/cms/index.cfm/new-home页面。
它应该像索引页面顶部的条件。
if (only baseURL) {
iFrame: Load http://beta.mydomain.com/cms/index.cfm/new-home
}
希望这有帮助:)