URL Rewriting

前端 未结 2 1800
名媛妹妹
名媛妹妹 2021-01-26 06:12

i am using URL rewriting in my asp.net application using regx

virtual URL is

/ProductDatabaseCMS/(?\\w*)/Product/(?\\w*)\\         


        
相关标签:
2条回答
  • 2021-01-26 06:55

    If you use a relative URI to reference the external stylesheet, you have to consider this: Relative URIs are always resolved from a base URI which is the URI of the current resource if not declared otherwise.

    So if you request /foo/bar and there is a relative URI reference css/baz.css in the HTML document, it would be resolved to /foo/css/baz.css as /foo/bar is the base URI.

    To solve this problem you have two options:

    1. use absolute URIs or at least absolute paths to reference the resources (e.g. /App_Themes/Styles/Style_Sheet.css), or
    2. set a suitable base URI using the BASE HTML element (e.g. <base href="/">) so that every relative URI is resolved from that new base URI.
    0 讨论(0)
  • 2021-01-26 07:00

    Use a "root-relative path" for the CSS href. You start the href with "/", that's all.

    Try: /App_Themes/Styles/Style_Sheet.css

    0 讨论(0)
提交回复
热议问题