User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 423,734 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,336 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

301 redirect on a non-aspx page?

Join Date: Oct 2004
Posts: 48
Reputation: SelArom is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
SelArom's Avatar
SelArom SelArom is offline Offline
Light Poster

Re: 301 redirect on a non-aspx page?

  #4  
Apr 3rd, 2008
Originally Posted by plazmo View Post
You should set this up in IIS using an http redirect.
You just need to have the file highlighted then in features view select http redirect then specify the new address in the box and check the two options for exact location and not the subdir and select the return code. and that should work


edit:
this is what it creates in your web.config
<location path="test.htm">
<system.webServer>
<httpRedirect enabled="true" destination="http://test.com/test.aspx" exactDestination="true" childOnly="true" httpResponseStatus="Permanent" />
</system.webServer>
</location>


thank you for your reply! would it be possible just to put this in the web.config file for each page and be done with it? or do I have to do something in IIS to make it work?

EDIT: okay I tried it in the web.config and it didn't work. I tried to follow your IIS instructions, but after highlighting the file and switching to Features View, there is no entry for httpredirect. is there something else I need to enable? thanks!
Last edited by SelArom : Apr 3rd, 2008 at 12:08 pm.
You are somebody, just as I am somebody... but in the end, when you REALLY think about it, we are all nobody...
Reply With Quote  
All times are GMT -4. The time now is 1:20 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC