Note that there are some explanatory texts on larger screens.

plurals
  1. POUrl Rewriting issue
    primarykey
    data
    text
    <p>HttpModule class as follows:-</p> <pre><code>namespace WebApplication1 { public class RewriterHttpModule : IHttpModule { public void Init(HttpApplication r_objApplication) { // Register our event handler with Application object. r_objApplication.BeginRequest += new EventHandler(BeginRequest); } public void Dispose() { // Left blank because we dont have to do anything. } protected void BeginRequest(object r_objSender, EventArgs r_objEventArgs) { // Authenticate user credentials, and find out user roles. HttpApplication objApp = (HttpApplication)r_objSender; HttpContext objContext = (HttpContext)objApp.Context; string fullOrigionalpath = objContext.Request.Url.ToString(); if (fullOrigionalpath.Contains("/Default/Books.aspx")) { objContext.RewritePath("/Default.aspx?Category=Books"); } else if (fullOrigionalpath.Contains("/Default/DVDs.aspx")) { objContext.RewritePath("/Default.aspx?Category=DVDs"); } } } } </code></pre> <p>Web.Config file as follows:- </p> <pre><code>&lt;configSections&gt; &lt;section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" /&gt; &lt;/configSections&gt; </code></pre> <p></p> <pre><code> &lt;add name="UrlRewriter" type="WebApplication1.RewriterHttpModule, WebApplication1"/&gt; &lt;/httpModules&gt; &lt;rewriter&gt; &lt;rewrite url="~/Default/books.aspx" to="~/Default.aspx?category=books"/&gt; &lt;rewrite url="~/Default/CDs.aspx" to="~/Default.aspx?category=CDs" /&gt; &lt;rewrite url="~/Default/DVDs.aspx" to="~/Default.aspx?category=DVDs" /&gt; &lt;/rewriter&gt; </code></pre> <p>Sitemaster Page as follows:-</p> <pre><code>&lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;link href="~/Styles/Site.css" rel="stylesheet" type="text/css" /&gt; &lt;asp:ContentPlaceHolder ID="HeadContent" runat="server"&gt; &lt;/asp:ContentPlaceHolder&gt; &lt;/head&gt; </code></pre> <p>I have the url rewriting working alright but when the default.aspx page is loaded on the browser it is not styled by the css stylesheet. What could be the problem?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload