Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4582444
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:04:32+00:00 2026-05-21T21:04:32+00:00

I am using UrlRewriter to rewrite my urls in an ASP.NET application. Everything works

  • 0

I am using UrlRewriter to rewrite my urls in an ASP.NET application. Everything works fine and the work which I need to do is working ok.

I want to redirect ~/product/45/something to ~/show_product_details.aspx?current_prod=45

and it’s working fine. But the problem is when I request ~/product/45/something, I am getting the page from ~/show_product_details.aspx?current_prod=45. After that when I click some link like ~/home.aspx, it again redirects me to ~/product/45/home.aspx.

Please suggest how to fix this. I am using this rule:

          <add name="Gallery1" virtualUrl="^~/product/(.*)/(.*)" 
                 rewriteUrlParameter="ExcludeFromClientQueryString"
                destinationUrl="~/show_product_details.aspx?current_prod=$1"
         ignoreCase="true" />   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T21:04:33+00:00Added an answer on May 21, 2026 at 9:04 pm

    It sounds like the URLs in your ASP.NET application are not resolved to the root of the application, but rather are relative links, causing the folder structure to be taken into account.

    If you are using ASP.NET Web Forms you need to ensure you either call ResolveUrl(“~/home.aspx”) when outputting the URL, or ensure that the hyperlink is runat=server, for example:

    <a runat="server" href="~/home.aspx">Home</a>
    

    OR:

    <a href='<%# ResolveUrl("~/home.aspx") %>'>Home</a>
    

    Another way you can resolve this is to have a base reference in your HTML, which tells the browser that ALL links on the page must be rooted at the specified path:

    In the <head> section:<base href='http://www.yourwebsite.com/' />

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using http://urlrewriter.net/ to rewrite urls at my website. For example, I'm rewriting: http://www.example.com/schedule.aspx?state=ca
I am trying to add some rewrite rules using UrlRewriter.net to my ASP.NET web
I am using the Intelligencia URL rewriter in my asp.net web application. I use
i am using Intelligencia.UrlRewriter.dll in asp.net for url re-writting, but i don't know about
I added UrlRewriter.net to my site today and it works fine with redirecting my
I'm developing a asp.net site (running .net 3.5 SP 1) and using UrlRewriter.Net (
We're using URLRewriter (http://urlrewriter.net), and would like to rewrite queries like this: domain.com/find/red-boots to
I am working on a website,i am using URL rewritter(http://urlrewriter.net) i am using .net
I'm using Intelligencia's UrlRewriter in my application and I'm having a problem where the
I am using org.tuckey.web.filters.urlrewrite.UrlRewriteFilter on my java project.It works fine .My issue is it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.