Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

iis7 redirect default.asp to root

Posted on 2010-09-09
3
Medium Priority
?
1,127 Views
Last Modified: 2012-05-10
A customer wants http://www.hisdomain.com/default.asp redirected to http://www.hisdomain.com/   (i.e. without the default.asp bit).

I tried using the HTTP Redirect in IIS7 but it just causes a loop / error - is it possible to do this somehow?
0
Comment
Question by:ascendinternet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Expert Comment

by:Brad Howe
ID: 33637803
Hi,
I assume you have a default File configured to IIS Manager.
SERVER | Sites | Site | In the Feature Pane | Select Default Document | make sure default.asp is added.
If ASP components were added after the site creation, they may not be present.
-Hades666
0
 

Author Comment

by:ascendinternet
ID: 33638171
default.asp is in the list of "default documents" and requesting http://www.hisdomain.com/ works (and shows default.asp).

However, the issue is if http://www.hisdomain.com/default.asp is requested (e.g. via Google or 3rd party link) then it needs to do a permanent redirect to http://www.hisdomain.com/.

The "problem" is Google has both indexed and treats them as duplicates, so the customer wants to effectively remove the "/default.asp" entry (by permanently redirecting).
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 2000 total points
ID: 33649162
Hi,

Ok i understand what you are trying to accomplish. This is for SEO...

To remove and redirect default.aspx from the URL, you'd use :

1. Install IIS Rewrite Module.

2. Open your Web.Config under your root site and add the following.

         <rule name="Hide and Redirect default.asp to Root." stopProcessing="true">
                   <match url="^(.*)$" ignoreCase="false" />
                   <conditions logicalGrouping="MatchAny">
                        <add input="{URL}" pattern="^(.*)/default.asp" />
                   </conditions>
                   <action type="Redirect" url="{C:1}" appendQueryString="false" />
         </rule>

The {C:1} MAY be different, so when you add this, open IIS Manager and in the URL rewrite Feature run a test against the RegEx to make sure it is validating correctly.

I just tested this and it works fine.

Cheers,
Hades666
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

730 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