web.config file not picking up

I have a subfolder on my site, that by mistake the default page is called indexnew.
It's not being picked up so I am trying to adjust the web.config file.
Yet, it's still not working.

I first tried adding a default doc.
then i tried uploading the file index.asp and putting a 301 redirect on it.
Neither is working

<configuration>
   
    <location path="index.asp">
        <system.webServer>
            <httpRedirect enabled="true" destination="http://www.donateautos.com/mobile/indexnew.aspx$S$Q" exactDestination="true" httpResponseStatus="Permanent" />
        </system.webServer>
    </location>
&#9; <system.webServer>
      <defaultDocument enabled="true">
         <files>
            <add value="indexnew.aspx" />
         </files>
      </defaultDocument>
   </system.webServer>
</configuration>

Open in new window

rivkamakAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
Are you getting any error on the browser?

What is the error logged in the application event viewer?

Regards
0
rivkamakAuthor Commented:
it's not working
if you go to http://www.donateautos.com/mobile you get to index.asp not indexnew.aspx
0
Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
Is the application hosted on IIS6.0 or 7.0?

Whatever version of IIS you are using, you might want to use URL rewrite module, it will work and achieve what you are aiming at with ease.

For more on URL rewrire module check

http://www.iis.net/downloads/microsoft/url-rewrite
http://www.iis.net/learn/extensions/url-rewrite-module

regards
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

rivkamakAuthor Commented:
Its on IIS6
0
rivkamakAuthor Commented:
Can you take a look at my code and see if I did anything wrong?
0
Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
Ok, what version of .NET are you using?

Is the indexnew.aspx in the list of default document?

Is there any error in the Application event viewer log?

regards
0
rivkamakAuthor Commented:
I'm using .net 2.0
this is the code in the config file.
<configuration>
   
    <location path="index.asp">
        <system.webServer>
            <httpRedirect enabled="true" destination="http://www.donateautos.com/mobile/indexnew.aspx$S$Q" exactDestination="true" httpResponseStatus="Permanent" />
        </system.webServer>
    </location>
	 <system.webServer>
      <defaultDocument enabled="true">
         <files>
            <add value="indexnew.aspx" />
         </files>
      </defaultDocument>
   </system.webServer>
</configuration>

Open in new window

0
Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
Code modified


<configuration>
   <system.webServer>
         <htppRedirect enabled="true" destination="http://www.donateautos.com/mobile/indexnew.aspx$S$Q" exactDestination="true" httpResponseStatus="Permanent" />
   
<defaultDocument enabled="true">
         <files>
            <add value="indexnew.aspx" />
         </files>
      </defaultDocument>
  </system.webServer>
</configuration>
                                 

http://msdn.microsoft.com/en-us/library/bb763179.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rivkamakAuthor Commented:
Nope, not working
0
StephanLead Software EngineerCommented:
Hi rivkamak,

When I navigate to:
http://www.donateautos.com/mobile

I get the following page:
http://www.donateautos.com/mobile/indexnew.aspx

According to your question, this should be the correct result.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.