Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a web.config file that I use to redirect specific pages for SEO reasons.

I want to redirect the content of one folder www.sample.com/pro/bcn to another folder www.sample.com/pro/barcelona on the same site, But I don't know how.

<configuration>
   <system.webServer>      
       <httpRedirect enabled="true" exactDestination="true"  httpResponseStatus="Permanent">
           <add wildcard="/forms/newsconfirmH.htm destination="/forms/NewsletterformH.htm" />
      </httpRedirect>       
   </system.webServer>
</configuration>

Please help.

share|improve this question
add comment

1 Answer

Make sure that HTTP Redirection is installed on your server. It is not available on the default installation of IIS 7. To install it, use the following steps (Windows Server 2008 or Windows Server 2008 R2):

  1. On the taskbar, click Start, point to Administrative Tools, and then click Server Manager.
  2. In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).
  3. In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.
  4. On the Select Role Services page of the Add Role Services Wizard, expand Common Http Features, select HTTP Redirection, and then click Next.

Then, put this in the web.config in the folder /pro/bcn

 ...
 <system.webServer>
    <httpRedirect enabled="true" destination="http://www.sample.com/pro/barcelona" />
 </system.webServer>
 ...
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.