English 中文(简体)
URL Redirect with BlogEngine
原标题:URL Redirect with BlogEngine

我正在把Blog从达斯博洛迁到邦格内。 在达斯博洛,我的URLs认为这样做。

在BlogEngine,我的URLs则喜欢。

http://pfsolutions-mi.com/blog/post/2008/03/08/Beyond-Compare.aspx

两种URLs之间的唯一区别是BlogEngine的“职位”分数。

页: 1 我现在利用国际空间法学会将WWWWWWWWWWWWW从URL中删除。 我试图这样做。

rule name="Blog Redirect" enabled="true" stopProcessing="true"

b. matchblog/([_0-9]+)/([_0-9]+)/([_0-9]+)/([_0-9a-z-]+.

行动类型=“Redirect” url=“blog/post/{R:1}/{R:2}/{R:3}/{R:4}

然而,当我进入一个老的达斯布洛朗时,没有被转往新地点。 相反,我收到了通用的BlogEngine 404 Error页。

注:我计划一旦我知道一切工作,就将改头盔。

问题回答

你们的 matching子是否更像这样看待?

match url="^blog/([0-9]+)/([0-9]+)/([0-9]+)/([w-]+).([a-z]+)$"

页: 1 [0-9a-z-]+t 包括“Beyond-Compare”等上层字母。

因此,我们应当有:url="blog/数/数/数/数/数/数/字数/字数/字数。

我们还可以进一步说明:

match url="^blog/([0-9]{2,4})/([0-9]{2})/([0-9]{2})/([w-]+).([a-z]{3,4})$"

根据你一贯的假设:

  1. Year as "08" or "2008"
  2. Month and day as "01" or "11"
  3. File endings with 3 or 4 lowercase letters (htm, html, php, asp, aspx, etc.)

EDIT:我认为“w+”不包括phen,因此,你必须将它变为“[w-]+”。





相关问题
Session Management with Windows Authentication

In an ASP.NET web app, using Integrated Windows Authentication, is the session tied to the windows identity? In other words, if I login (using IWA) to the app, and the app stores some "stuff" in my ...

Using Elmah with Cassini

Does anyone know if I can use Elmah with Visual Studio build-in web server(aka Cassini)? I get it working easily on IIS, but using same configuration, it doesn t work with Cassini. When I requested ...

Setting hostname in IIS, include www?

I want to set the hostname for a website I m adding in IIS 7, however do I include the www in the hostname or not? because I want both www.mysite.com and mysite.com both to point to mysite on the ...

inetpub versus any other folder

I ve run websites out of inetpub, as well as from folders just residing on the C: drive. I wonder, are there any definitive advantages to running websites out of inetputwwwroot?

IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

热门标签