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

  • SEARCH
  • Home
  • 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 6854219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:36:24+00:00 2026-05-27T01:36:24+00:00

I want to create a rule to redirect query to a page (which doesn’t

  • 0

I want to create a rule to redirect query to a page (which doesn’t exist) to another

Example:

http://www.example.com/en/page.asp?id=2&...

to

http://www.example.com/en-US/newpage.asp?id=2&...

I use this rule:

<rule name="Redirect" stopProcessing="true">
    <match url="page\.asp\?(.+)$" />
    <action type="Rewrite" url="newpage.asp?{R:1}" />
</rule>

But this doesn’t work… I got a 404 error…

What is my mistake?

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. Editorial Team
    Editorial Team
    2026-05-27T01:36:24+00:00Added an answer on May 27, 2026 at 1:36 am
    1. URL Rewrite’s Rewrite action is only for rewriting the page URL that
      gets displayed on the browser but it expects the original page to
      exist on the server. For your case, you need a Redirect action.
    2. The regex needs to be changed to reflect “en-US” in the final URL.

    Try this code instead:

    <rule name="Redirect" stopProcessing="true">
        <match url="en/page\.asp\?(.+)$" />
        <action type="Redirect" url="en-US/newpage.asp?{R:1}" redirectType="Permanent"/>
    </rule>
    

    The permanent redirect helps makes your website SEO (Search Engine Optimized) preventing search engine bots to index the old URL (and hence not splitting page ranks between the 2 URLs).

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

Sidebar

Related Questions

I want to create an asp.net white-label site http://whitelabel.com , that could be styled
Example: I want to create one AutoResponse rule that will map all calls to
The example in doc http://www.rebol.org/documentation.r?script=rebelxml.r to create XML works >> clear-xml-data == >> set-xml-data/content
I want to create a rule for one subdomain which redirects to a file
In the below example, I want to create a CSS rule that applies only
I want to create a client side mail creator web page. I know the
I want to create a simple http proxy server that does some very basic
I want to create an allocator which provides memory with the following attributes: cannot
I want to create a rule at the end of an .htaccess file that
I want to create a rule to target the a element in the following:

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.