问题描述
我使用的URL与以下规则reqritting:
Am using url reqritting with following rule :
<治源=/ galary.aspx()目标=galary.aspx $ 1吗?/>
该链接在母版,我已经设置阿克尔像标签:
The links are in MasterPage where I have set achor tags like :
&下; A HREF =/ 2 / galary.aspx> Galary 2'; / A>结果
它在内部交易为:结果
/galary.aspx?2
该页面工作正常,我用此规则。但是其他环节的休息时间和图像不喜欢上显示的页面
The page is working fine for me with this rule. But the other link breaks and the images are not shown on pages like.
在检查了页面的源代码code,我发现所有图像和其它菜单的链接相同的格式被改变,我申请规则的URL。
这样的:实际图像路径:/images/img.gif但现在它们是:/2/images/img.gif
When checked the source code of the page, I found that the links of all images and other Menus are changed in the same format as, I applied rules for the url.Like : actual images path: /images/img.gif but now these are : /2/images/img.gif
我手动设置绝对路径的一切,然后图像出现,但它不是一个解决方案。
I manually set the absolute path for everything then images appeared but its not a solution.
等待你输入
推荐答案
您的解决方案很简单,因为点的的各个环节的规则匹配(。)。变化规律需要先用数字匹配常规的前pression:
Your solution is simple, your rule match every links because of dot (.). change rule you need a regular expression that match with number first:
(\d+)/gallery\.aspx
这个替换您的规则,它只是相匹配的输入/ Gallery.aspx
这篇关于网址rewritting影响其他linksthe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!