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 4035044
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:02:56+00:00 2026-05-20T12:02:56+00:00

I am getting problem in URL rewrite rules. I am used UrlRewritingNet.UrlRewriter Dll for

  • 0

I am getting problem in URL rewrite rules.
I am used UrlRewritingNet.UrlRewriter Dll for Url rewriting in asp.net website.
I used rules name as “Advanced”
& Other rule name as DefaultRule that is used for any user profile page(ie. any user’s profile page).
When I entered username as “AdvancedMachinesTools“.
That Rules as below:-

<urlrewritingnet rewriteOnlyVirtualUrls="true" contextItemsPrefix="QueryString" defaultPage="Login" xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites>
    <add name="advanced" virtualUrl="^~/advanced" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/advancedSearch.aspx" ignoreCase="true"  />
    <add name="DefaultRule" virtualUrl="^~/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/UserProfile.aspx?uname=$1" ignoreCase="true"/>
</rewrites>
</urlrewritingnet>

I got error message “File does not exist” I wrote DefaultRule at last in web.config file.

How I resolved it…?

EDITED

Examples
Suppose that my website url: http://www.abcd.com
1) For advanced rule I wrote URL like this http://www.abcd.com/advanced
Rule:

<add name="advanced" virtualUrl="^~/advanced" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/advancedSearch.aspx" ignoreCase="true"  /> 

2) for Default user rule
for suppose username: AdvancedEyecare it used default rule

 <add name="DefaultRule" virtualUrl="^~/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/UserProfile.aspx?uname=$1" ignoreCase="true"/>

When I enter url like http://www.abcd.com/AdvancedEyecare
Then I got error “File not exist” because Rule used 1 advanced rule not used user default rule. I want to call userrule instead of 1 advanced rule.
How can solve it?

  • 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-20T12:02:56+00:00Added an answer on May 20, 2026 at 12:02 pm

    Put an $ at the end of the first pattern:

    <add name="advanced" virtualUrl="^~/advanced$" destinationUrl="~/advancedSearch.aspx" />
    

    This will only match /advanced and rewrite it to /advancedSearch.aspx:

    http://www.abcd.com/advanced -> http://www.abcd.com/advancedSearch.aspx
    

    The other rewrite you want is

    http://www.abcd.com/AdvancedEyecare -> http://www.abcd.com/UserProfile.aspx?uname=AdvancedEyecare   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using UrlRewriter to rewrite my urls in an ASP.NET application. Everything works
I am working on URL rewrite and I found one tutorial on asp.net site,
As explained in the title, I am having a problem with getting the URL
I just started using URLRewriter.net with my blog and I have a problem with
I'm having a problem getting the root URL with this PHP function I composed.
Having a problem getting the URL for a resource for some reason: This code
I am getting problem to read pdf files using iText in java. I can
i am getting problem as i have some data in a database tabel file
I am getting problem while setting up Session cookie using jersey. is there any
Having a problem getting a TreeView control to display node images. The code below

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.