Solved

IIS - redirect to root site

Posted on 2013-01-03
3
575 Views
Last Modified: 2013-04-08
We have a site at store.mysite.com.

Some of the links marketing as published link to store.mysite.com/store/

If a user clicks this link, it just goes to a 403 error page. Is it possible to make IIS redirect requests to store.mysite.com/store/ back to store.mysite.com?

Thanks!
0
Comment
Question by:dthansen
3 Comments
 
LVL 29

Assisted Solution

by:Randy Downs
Randy Downs earned 167 total points
ID: 38742571
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 166 total points
ID: 38742835
which version of iis? you will need the url rewrite module

--- web.config ---
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
       <rewrite>
  <rules>
   <rule name="Redirect to Root" stopProcessing="true">
     <match url="^store/(.*)" />
       <conditions>
                        <add input="{HTTP_HOST}" pattern="^(www\.)?mysite.com$" />
       </conditions>
      <action type="Redirect" url="http://{C:0}/{R:1}" redirectType="Permanent" />
   </rule>
  </rules>
</rewrite>
    </system.webServer>
</configuration>
-----
0
 
LVL 10

Accepted Solution

by:
Monica P earned 167 total points
ID: 38787085
Incase of IIS 7

Set the Default Document for the Website  IIS
------------------------------------------------------------------------
http://www.serverintellect.com/support/windowsserver2008/Default-document-IIS7.aspx

Allow directory browsing option Enabled if you still face any error and check


Or Set in webconfig file
-----------------------------

<configuration>
   <system.webServer>
      <defaultDocument enabled="true">
         <files>
            <add value="index.php" />
         </files>
      </defaultDocument>
   </system.webServer>
</configuration>
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now