Solved

IIS - redirect to root site

Posted on 2013-01-03
3
578 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 79

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

785 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