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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:08:01+00:00 2026-05-23T19:08:01+00:00

I don’t understand anything about IIS, but am trying to solve this problem of

  • 0

I don’t understand anything about IIS, but am trying to solve this problem of redirecting all visitors to example.com/page to example.com/page.html

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.webServer>
    <rewrite>
          <rewriteMaps>
              <rewriteMap name="StaticRedirects">
                  <add key="/page" value="/page.html" />
              </rewriteMap>
            </rewriteMaps>
      </rewrite>
  </system.webServer>
</configuration>

A couple of problems arise:

  1. I don’t know where to even put the file. There is a User root directory, and an htdocs directory, I tried both, no joy.
  2. I don’t even know if the account can do rewrites, I am trying to find that out.
  • 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-23T19:08:02+00:00Added an answer on May 23, 2026 at 7:08 pm

    1) Your existing web.config: you have declared rewrite map .. but have not created any rules that will use it. RewriteMap on its’ own does absolutely nothing.

    2) Below is how you can do it (it does not utilise rewrite maps — rules only, which is fine for small amount of rewrites/redirects):

    This rule will do SINGLE EXACT rewrite (internal redirect) /page to /page.html. URL in browser will remain unchanged.

    <system.webServer>
        <rewrite>
            <rules>
                <rule name="SpecificRewrite" stopProcessing="true">
                    <match url="^page$" />
                    <action type="Rewrite" url="/page.html" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
    

    This rule #2 will do the same as above, but will do 301 redirect (Permanent Redirect) where URL will change in browser.

    <system.webServer>
        <rewrite>
            <rules>
                <rule name="SpecificRedirect" stopProcessing="true">
                    <match url="^page$" />
                    <action type="Redirect" url="/page.html" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
    

    Rule #3 will attempt to execute such rewrite for ANY URL if there are such file with .html extension (i.e. for /page it will check if /page.html exists, and if it does then rewrite occurs):

    <system.webServer>
        <rewrite>
            <rules>
                <rule name="DynamicRewrite" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}\.html" matchType="IsFile" />
                    </conditions>
                    <action type="Rewrite" url="/{R:1}.html" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't know if this is an eclipse specific problem but whenever I declare a
Don't need to do this right now but thinking about the future... What would
(Don't know if this is strictly on-topic, but I don't see any better Stack
Don't know how to explain it better but i'm trying to get a response
I don't know if this question is trivial or not. But after a couple
Don't know if this is the right place to ask this, but I will
Don't know why this is happening, but after submitting a form via JS (using
don't understand: in my controller: @json = User.all.to_gmaps4rails do |user| \Title\: \#{user.email}\ end in
Don't understand, if Data.Map is and [] is. I found this out while wondering
I don't know if this has been asked before, but what i'd like to

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.