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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:57:05+00:00 2026-05-11T09:57:05+00:00

In my project, my /PropertDetail.aspx can get 2 querystrings. 1st one for the PropertyId

  • 0

In my project, my /PropertDetail.aspx can get 2 querystrings.

1st one for the PropertyId /PropertDetail.aspx?PropertyId=5

2nd one for the Language /PropertDetail.aspx?PropertyId=5&Language=2

EDIT: and this page can get one of them or can get both of them, so my rewriter rule needs to handle both of them

So, i have set these rules to web.config

<rewriter>         <rewrite url='^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js)(\?.+)?)$' to='$1' processing='stop' />         <rewrite url='^/(.+)-(.+).aspx$' to='/PropertyDetail.aspx?PropertyId=$2' processing='stop'/>         <!--http://localhost:1562/Harika-Gayrimenkul-5.aspx-->         <rewrite url='^/(.+)-(.+)-(.+).aspx$' to='/PropertyDetail.aspx?PropertyId=$2&#038;Language=$3' processing='stop'/>         <!--http://localhost:1562/Great-Property-5-2.aspx--> </rewriter> 

It is all OK if there is no Language querystring, but when there is a language querystring it gets the 3rd expression as the PropertyId instead of Language

How can i define these two rules for the same page ?

Thanks

  • 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. 2026-05-11T09:57:05+00:00Added an answer on May 11, 2026 at 9:57 am

    Combined answer:

    <rewriter>     <rewrite url='^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js)(\?.+)?)$' to='$1' processing='stop'/>     <rewrite url='^.+?([\d]+?)-([\d]+?)\.aspx$' to='/PropertyDetail.aspx?PropertyId=$1&amp;Language=$2' processing='stop'/>     <rewrite url='^.+?-([\d]+?)\.aspx$' to='/PropertyDetail.aspx?PropertyId=$1' processing='stop'/>  </rewriter> 

    That’s working well now for many combinations:

    /This-is-a-really-long-property-title-555-12 

    returns PropertyId=555 and Language=12.

    /This-is-another-really-long-property-title-666 

    returns PropertyId=666.

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

Sidebar

Related Questions

Project : ASP.NET 3.5 Server : SQL Server 2008 One of the page in
Project : Game in Flex builder 4 (Actionscript Project) Language : Actionscript 3 This
Project type: Asp MVC 2/NHibernate/C# Problem If you have an edit page in an
Project Euler 126 says: If we then add a second layer to this solid
The project is ASP.NET 2.0, I have never been able to reproduce this myself,
Project (id) Permission (project_id, user_id) When trying to save a project, I get the
Project has_many :items Item belongs_to :project I'm trying to get the projects sorted by
Project: ASP.NET 3.5 with C# I have this much :- A table which used
Project Background: I am writing a map tile overlay class for java that can
Project structure is: /foo pom.xml /foo-war pom.xml /foo-ear pom.xml This is my parent pom.xml

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.