且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Microsoft URL重写模块和图像

更新时间:2023-02-23 12:46:03

" / > < 条件 > < 添加 =" {REQUEST_FILENAME}" 匹配类型 IsFile " 否定 true" / < 添加 =" {REQUEST_FILENAME}" 匹配类型 IsDirectory " 否定 true" / < /conditions > < 动作 =" 重定向" 重定向类型 永久" url =" {R:1}" / > < /rule >
" /> <conditions> <add input="{REQUEST_FILENAME}" matchtype="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchtype="IsDirectory" negate="true" /> </conditions> <action type="Redirect" redirecttype="Permanent" url="{R:1}" /> </rule>




2-我添加了以下规则,因为我的图像和css文件位于名称为样式"的目录中




2- I''ve added the following rule as my images and css files are in a directory with name "Style"

<rule name="RewriteImages" stopprocessing="true">
        <match url="^Style/(.+)" />
        <action type="Rewrite" url="Style/{R:1}" />
</rule>



适用于0和1级:



It works fine for 0 and 1 level:

domain-name.com
domain-name.com/phrase1



但是,使用多个级别时,不会显示图像:



But image is not displayed while using more than one level:

domain-name.com/phrase1
domain-name.com/phrase1/phrase2
domain-name.com/phrase1/phrase2/phrase3
etc.
!!!!



但是css文件中的样式仍然可以使用

另一个问题..
重写在localhost上不起作用,我正在使用Visual Web Developer Express2008.


请紧急帮助.



But still the styles in css file is working

Another Question..
Rewriting doesn''t work on localhost, I''m using Visual Web Developer Express 2008.


Please help urgently.