【原创】UrlRewritingNet.UrlRewrite 中文文档 (一)
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://wanna.blogbus.com/logs/10729515.html
What is UrlRewritingNet.UrlRewrite?
什么是UrlRewritingNet.UrlRewrite?
UrlRewritingNet.UrlRewrite is a module which could be embedded in an ASP.NET 2.0 application to rewrite Urls (Internet addresses) for displaying the user another URL than used from the server. With UrlRewritingNet.UrlRewrite you only have to define a few simple rules for rewriting your addresses.
urlrewritingnet.urlrewrite是一个可以嵌入在asp.net 2.0应用改写的url (互联网地址)的模块,展示给用户的另一个网址。使用urlrewritingnet.urlrewrite你只需要确定几个简单的规则来重写你的地址。
Why rewriting my Urls?
为什么重写我的Urls?
A littile example.You're developing blog software which stores its entries in a database. To get the entry for displaying it in a details page you need the identity (ID) of the record to display. To get the ID you usually transport this value by Query String: http://myblog.com/details.aspx?id=234.
一个简单的列子。你开发一个依靠数据库存储输入的Blog软件。为了将你的输入显示在详细的页面,你需要这条记录的ID。为了得到ID,你通常传送请求字符串值,http://myblog.com/details.aspx?id=234.
If your blog is ready and online you want to be found by potential readers on search engines like Google or Yahoo. These search engines send bots out to the World Wide Web to find interesting content. So what do you mean what the bot does with a Url like shown above? Not much, right.
如果你的Blog已经上线,你想通过Google或者Yahoo!这样的搜索引擎获得潜在的读者。这些搜索引擎派送机器人通过WWW去发现有趣的内容。所以你觉得机器人对于上面的链接有几个会喜欢?不太多,嗯。
So,wouldn't it be cooler if the bot could find topic of the blog entry in the Url for example? A rewritten Url could look like this:http://myblog.com/detail/good-news-for-a-better-world-234.aspx.
所以,如何才能让它能够被机器人发现这些blog主题?一种重写Url类似于这种方式:http://myblog.com/detail/good-news-for-a-better-world-234.aspx.
The machine (search engine bot) has something to analyze and the user can imagine what the topic is about on this page,too.
这种Url链接使得,这些机器(搜索引擎机器人)有一些东西可以分析,并且使用者也可以才想出这些链接所连接的文章主题。
Functions of UrlRewritingNet.UrlRewrite
UrlRewritingNet.UrlRewrite 函数
There are some solutions for rewriting Urls with ASP.NET, but mostly there are some disadvantages, for example missing support for Themes and Master Pages. For some you need Administrator rights to install an ISAPI extension on the server.
一些asp.net Urls重写的解决方案大都有一些缺点,比如失去对Themes和Master Pages的支持。对于一些你需要管理员的权限在服务器上安装一个ISAPI扩展。
This isn't necessary by UrlRewritingNet.UrlRewrite and you could avoid many problems.
使用UrlRewritingNet.UrlRewrite 就不需要这些,并且你可以避免很多问题。
Rewriting Urls based on regular expressions
Support for Themes and Master Pages
Support for OutputCacheing
Use in medium trust level environments (shared hosting) possible
Consistent Url after post back
Adding own rewrite rule providers possible
Redirects (also permanent) to other domains or websites possible
Support for Cookie less Sessions
Adding rewrite rules on runtime
Very easy installation and use
基于正则表达式的Urls重写
支持Themes和Master Pages
支持输出缓存
适应中度权限的环境(虚拟环境下也可以)
回发后Url地址保持不变
添加自己的重写规则驱动
跳转到其他域名或者网站(持久)
支持Cookie和少量的Sessions
在运行环境中添加重写规则
非常简单的安装和使用
Limitations of UrlRewritingNet.UrlRewrite
UrlRewritingNet.UrlRewrite 的限制
So many good things have of course a shady side, too. Because of rewriting with the .NET 2.0 engine only requests coming over ASP.NET 2.0 can be handled. This means that the file extension have to be handled by ASP.NET 2.0 ISAPI library (see: Server Settings, page 14). By default this is for example .aspx but if you want to rewrite with other extensions, you have to set this up by yourself or ask your Administrator to do this.
尽管有如此多的好处,当然也有一些不变的地方。因为重写依赖于.Net 2.0引擎,所以只有来自于asp.Net 2.0的请求能够被处理。这就意味着文件的扩展名不得不被Asp.Net 2.0 ISAPI Library处理(见:服务器设置,14页)。对于默认的扩展名.aspx能够处理,但是如果你想重写其他的扩展名,你不得不自己设置这些,或者请求你的管理员做这件事情。
For this reason there is also no rewrite without extension possible (for example http://myblog.com/user/bill). For a solution for this special problem see page 6, Rewrite Urls without file extension.
因为这些原因,对于没有扩展名的也不可能进行重写(比如:http://myblog/user/bill).对于这种特殊的问题有特殊的解决方案参见第六页,无扩展名重写。
We are also sorry to tell you,that,Cross Pageing Posttings are not available yet without disabling security checks.
我们也很遗憾的告诉您,跨页面传送是无效的,除非禁用安全检查。
历史上的今天:
【原创】UrlRewritingNet.UrlRewrite 中文文档 (三) 2007-11-10【原创】UrlRewritingNet.UrlRewrite 中文文档 (二) 2007-11-10我很忙--JAY CHOU ON THE RUN 2007-11-10
随机文章:
【原创】UrlRewritingNet.UrlRewrite 中文文档 (四) 2007-11-14【原创】UrlRewritingNet.UrlRewrite 中文文档 (三) 2007-11-10【原创】UrlRewritingNet.UrlRewrite 中文文档 (二) 2007-11-10【翻译】How to Resolve a Conflict at Work 2007-03-31
【原创】UrlRewritingNet.UrlRewrite 中文文档 (一)
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://wanna.blogbus.com/logs/10729515.html
What is UrlRewritingNet.UrlRewrite?
什么是UrlRewritingNet.UrlRewrite?
UrlRewritingNet.UrlRewrite is a module which could be embedded in an ASP.NET 2.0 application to rewrite Urls (Internet addresses) for displaying the user another URL than used from the server. With UrlRewritingNet.UrlRewrite you only have to define a few simple rules for rewriting your addresses.
urlrewritingnet.urlrewrite是一个可以嵌入在asp.net 2.0应用改写的url (互联网地址)的模块,展示给用户的另一个网址。使用urlrewritingnet.urlrewrite你只需要确定几个简单的规则来重写你的地址。
Why rewriting my Urls?
为什么重写我的Urls?
A littile example.You're developing blog software which stores its entries in a database. To get the entry for displaying it in a details page you need the identity (ID) of the record to display. To get the ID you usually transport this value by Query String: http://myblog.com/details.aspx?id=234.
一个简单的列子。你开发一个依靠数据库存储输入的Blog软件。为了将你的输入显示在详细的页面,你需要这条记录的ID。为了得到ID,你通常传送请求字符串值,http://myblog.com/details.aspx?id=234.
If your blog is ready and online you want to be found by potential readers on search engines like Google or Yahoo. These search engines send bots out to the World Wide Web to find interesting content. So what do you mean what the bot does with a Url like shown above? Not much, right.
如果你的Blog已经上线,你想通过Google或者Yahoo!这样的搜索引擎获得潜在的读者。这些搜索引擎派送机器人通过WWW去发现有趣的内容。所以你觉得机器人对于上面的链接有几个会喜欢?不太多,嗯。
So,wouldn't it be cooler if the bot could find topic of the blog entry in the Url for example? A rewritten Url could look like this:http://myblog.com/detail/good-news-for-a-better-world-234.aspx.
所以,如何才能让它能够被机器人发现这些blog主题?一种重写Url类似于这种方式:http://myblog.com/detail/good-news-for-a-better-world-234.aspx.
The machine (search engine bot) has something to analyze and the user can imagine what the topic is about on this page,too.
这种Url链接使得,这些机器(搜索引擎机器人)有一些东西可以分析,并且使用者也可以才想出这些链接所连接的文章主题。
Functions of UrlRewritingNet.UrlRewrite
UrlRewritingNet.UrlRewrite 函数
There are some solutions for rewriting Urls with ASP.NET, but mostly there are some disadvantages, for example missing support for Themes and Master Pages. For some you need Administrator rights to install an ISAPI extension on the server.
一些asp.net Urls重写的解决方案大都有一些缺点,比如失去对Themes和Master Pages的支持。对于一些你需要管理员的权限在服务器上安装一个ISAPI扩展。
This isn't necessary by UrlRewritingNet.UrlRewrite and you could avoid many problems.
使用UrlRewritingNet.UrlRewrite 就不需要这些,并且你可以避免很多问题。
Rewriting Urls based on regular expressions
Support for Themes and Master Pages
Support for OutputCacheing
Use in medium trust level environments (shared hosting) possible
Consistent Url after post back
Adding own rewrite rule providers possible
Redirects (also permanent) to other domains or websites possible
Support for Cookie less Sessions
Adding rewrite rules on runtime
Very easy installation and use
基于正则表达式的Urls重写
支持Themes和Master Pages
支持输出缓存
适应中度权限的环境(虚拟环境下也可以)
回发后Url地址保持不变
添加自己的重写规则驱动
跳转到其他域名或者网站(持久)
支持Cookie和少量的Sessions
在运行环境中添加重写规则
非常简单的安装和使用
Limitations of UrlRewritingNet.UrlRewrite
UrlRewritingNet.UrlRewrite 的限制
So many good things have of course a shady side, too. Because of rewriting with the .NET 2.0 engine only requests coming over ASP.NET 2.0 can be handled. This means that the file extension have to be handled by ASP.NET 2.0 ISAPI library (see: Server Settings, page 14). By default this is for example .aspx but if you want to rewrite with other extensions, you have to set this up by yourself or ask your Administrator to do this.
尽管有如此多的好处,当然也有一些不变的地方。因为重写依赖于.Net 2.0引擎,所以只有来自于asp.Net 2.0的请求能够被处理。这就意味着文件的扩展名不得不被Asp.Net 2.0 ISAPI Library处理(见:服务器设置,14页)。对于默认的扩展名.aspx能够处理,但是如果你想重写其他的扩展名,你不得不自己设置这些,或者请求你的管理员做这件事情。
For this reason there is also no rewrite without extension possible (for example http://myblog.com/user/bill). For a solution for this special problem see page 6, Rewrite Urls without file extension.
因为这些原因,对于没有扩展名的也不可能进行重写(比如:http://myblog/user/bill).对于这种特殊的问题有特殊的解决方案参见第六页,无扩展名重写。
We are also sorry to tell you,that,Cross Pageing Posttings are not available yet without disabling security checks.
我们也很遗憾的告诉您,跨页面传送是无效的,除非禁用安全检查。

浙公网安备 33010602011771号