由于网址重写丢失了CSS和图像 [英] loses css and images due to Url Rewriting

查看:64
本文介绍了由于网址重写丢失了CSS和图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的项目中实现了Url重写,但是由于所有CSS和图像
已经丢失了..只有数据从那儿传过来,却没有CSS.即使我也使用了相对路径,任何人都可以给我确切的解决方案.例如

I have implemented Url Rewriting in my Project But due to that All CSS and Images
has been lost ..only data is coming over there but with out css.Can Any body give me the exact solution even i have used Relative path too.For Example

<link href="<%=RelativePath %>Sections/GL/Campaign/Style/CSS/loadingbox.css" rel="stylesheet" type="text/css" />


在Web Config上.


On Web Config.

<rewrite url="^~/Sections/GL/ShopingCart/(.+)" to="~/Sections/GL/TransactionProceed.aspx?SectionId=$1" />



在我的页面上



On My Page

Response.Redirect(RelativePath + "Sections/GL/ShopingCart/" + GetEncodedID(this.SectionID));

推荐答案

1"/>



在我的页面上



On My Page

Response.Redirect(RelativePath + "Sections/GL/ShopingCart/" + GetEncodedID(this.SectionID));


使用此技巧来解析URL:
Use this tip to resolve the URL''s: Resolving Paths in a Multi-Folder WebSite[^]

Once the URL''s are resolved, CSS files reference too should get resolved.


这篇关于由于网址重写丢失了CSS和图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆