From ScottGu's blog:
I have a theme under App_Themes folder and when page get rendered for simple rewrite rule, something like this:
<rewrite url="~/wiki" to="~/pages/wikipage.aspx" />
it’s working properly, but when I display another page for rewrite rule having query string, something like this:
<rewrite url="~/wiki/my-wiki/file/my-file" to="~/pages/files.aspx" />
theme is not render on page. I tried investigating this issue and I found that this is because, rendered HTML page has relative CSS path inside HEAD which is automatically inserted by ASP.NET engine.
<link href="../App_Themes/Default/style.css" type="text/css" rel="stylesheet" />
Is there a way to rewrite the app_themes url or any other way to handle this?
- Fredrik
Logged In: YES
user_id=1371088
Originator: NO
Hi,
To fix this you'll have to add a <base href=""/> tag to your page's <head> tag, pointing to the root of the webserver..
This will fix similar relative links..