ISAPI_Rewrite 3.0 ...菜鸟...如何开始?刚刚安装
刚刚安装了 v3 lite 来尝试一下,然后再获得完整版本。
我在 .net web 应用程序的根文件夹中的 .htaccess 文件中收到以下内容,
RewriteEngine On
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^zzzz-wildcard\.domain\.com
RewriteRule ^(.*)$ http://domain.com/zzzz-wildcard$1 [R]
问题是它没有执行任何操作。我在 iis 上设置了通配符,以便
test.domain.com 的服务就像 domain.com 一样。 我想要实现的是将任何子域 user1.domain.com
作为 domain.com/zzzz-wildcard
提供服务,
从我到目前为止得到的甚至明确提供 >zzzz-wildcard.domain.com
仍然提供domain.com 的default.aspx,而不是domain.com/zzzz-wildcard/default.aspx
请帮忙。我从来没有使用过 isapi rewrite,所以我不知道如何解决这个问题......现在就目前情况而言,它并没有真正做任何事情。也不能说我擅长正则表达式:(
打开 ISAPI_Rewrite Manager 并从 iis 网站列表中选择我的 domain.com 时,它显示此节点没有可用的属性。< /code>
********< /strong> 编辑********
环顾四周后,我发现了 lite版本不支持 .htaccess,所以只有 httpd.conf 文件可以全局使用。所以无论如何,我修改了 httpd.conf 文件,它现在可以工作了..
但是它只是重定向 zzzz-wildcard.domain.com
到domain.com/zzzz-wildcard
有没有办法保持网址完整且不重定向,但仍然提供来自 domain.com/zzzz-wildcard
的页面?
just installed v3 lite to try it out before getting full version.
i got the follwing in .htaccess file in the root folder of the .net web app
RewriteEngine On
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^zzzz-wildcard\.domain\.com
RewriteRule ^(.*)$ http://domain.com/zzzz-wildcard$1 [R]
problem is it doesn't do anything. i got the wildcard set up on iis so that
test.domain.com is served just as domain.com would be.
What i want to achieve is to serve any sub-domain user1.domain.com
as domain.com/zzzz-wildcard
from what i got so far even explicity supplying zzzz-wildcard.domain.com
still serves the default.aspx of the domain.com instead of domain.com/zzzz-wildcard/default.aspx
please help. i have never worked with isapi rewrite so i have no clue how to go about this.... right now as it stand it doesn't really do anything. can't say i'm good with regular expressions either :(
When opening ISAPI_Rewrite Manager and selecting my domain.com from the list of iis websites it says No properties available for this node.
******** EDIT ********
after some more looking around i found out that lite version doesn't support .htaccess so only httpd.conf file that works globally. So anyway i modified the httpd.conf file instead and it now works..
however it just redirects zzzz-wildcard.domain.com
to domain.com/zzzz-wildcard
Is there a way to keep the url intact and not redirect? but still serve the pages from domain.com/zzzz-wildcard
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 stackoverflow 上查看其他答案后终于解决了
finally solved after looking around other answers on stackoverflow