2017-06-19 37 views
0

我有一個htaccess規則是這樣的:如何在IIS/web.config中重寫仍然顯示類型化/漂亮的URL?

RewriteRule ^page/pretty/([A-Za-z0-9\-]+)-(.[A-Za-z0-9]*)/?$ /page/pretty/prettytemplatepage/?code=$2&path=page/pretty/$1-$2&slug=$1-$2 [P,L] 

這個工作,讓像一個網址:

site.com/page/pretty/some-pretty-page-ABCD 

要在顯示頁面:

site.com/page/pretty/prettypagetemplate/?code=ABCD&path=page/pretty/some-pretty-page-ABCD&slug=some-pretty-page-ABCD 

沒有重定向/改變地址欄中的網址。我如何在Azure/IIS/web.config中完成同樣的事情?

回答