iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > Classic ASP

Reply
 
LinkBack (1) Thread Tools
Old March 22nd, 2006, 04:33 PM   1 links from elsewhere to this Post. Click to view. #1
New Member
 

Join Date: Nov 2005
Age: 40
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 modernape is on a distinguished road
301 redirect on windows server (not asp)?

Hiya,
I've been searching for this for a while, but can't find a solution. I need to create some 301 redirects for some renamed html pages, but my server is windows based. I can't afford to move to an apache server, so can't do .htaccess or IIS (only works with .asp pages?). What do I do? Much appreciated
modernape is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 22nd, 2006, 09:10 PM   #2
Highly Reputable Member
 

Join Date: May 2005
Location: U.K
Age: 22
Posts: 728
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 benbramz will become famous soon enough
Re: 301 redirect on windows server (not asp)?

Code:
<% 
Response.Status = "301 Moved Permanently" 
Response.addheader "Location", "http://www.yourdomain.com/newpageurl/" 
Response.End 
%>
benbramz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 23rd, 2006, 09:00 AM   #3
New Member
 

Join Date: Nov 2005
Age: 40
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 modernape is on a distinguished road
Re: 301 redirect on windows server (not asp)?

Great, that was easier than I thought! Thanks for that, much appreciated. : )
modernape is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 23rd, 2006, 12:46 PM   #4
Highly Reputable Member
 

Join Date: May 2005
Location: U.K
Age: 22
Posts: 728
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 benbramz will become famous soon enough
Re: 301 redirect on windows server (not asp)?

np
benbramz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 14th, 2007, 03:25 PM   #5
New Member
 

Join Date: Feb 2007
Location: Charlotte, NC
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 wgrasty is on a distinguished road
Re: 301 redirect on windows server (not asp)?

I was happy to find that this is possible on Windows servers; however, I tried it and it's not working. I am wanting to redirect an .html file to a .asp file. Is there anything additional I need to do besides using that code for my .html file? Any help is appreciated.
wgrasty is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 14th, 2007, 05:13 PM   #6
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,133
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
Re: 301 redirect on windows server (not asp)?

whoa..... way to drag up and old thread.... nice find!!

This is way more difficult, but can be be achieved using a custom 404 error handler.... not for the feint hearted especially if you have multiple pages to do.

I would shout me on msn messenger for this one -
aspwiz {at} hotmail {dot} com
__________________
Rob - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 15th, 2007, 12:33 PM   #7
Elite Veteran
 

Join Date: Aug 2005
Location: That Place
Posts: 2,081
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Rep Altering Power: 0 moojoo will become famous soon enough moojoo will become famous soon enough
Re: 301 redirect on windows server (not asp)?

Apache it's easy with .htaccess =P. And isn't apache free? Apache, Linux, PHP/MySQL = server for nothing.
__________________

moojoo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 15th, 2007, 01:14 PM   #8
New Member
 

Join Date: Jan 2007
Location: Manchester
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 badlyDrawnToy is on a distinguished road
Re: 301 redirect on windows server (not asp)?

IIS allows you to redirect without scripting. see http://www.accessibility101.org.uk/tips/80.htm for how to do it
badlyDrawnToy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 15th, 2007, 09:22 PM   #9
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,133
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
Re: 301 redirect on windows server (not asp)?

Quote:
Originally Posted by badlyDrawnToy View Post
IIS allows you to redirect without scripting. see http://www.accessibility101.org.uk/tips/80.htm for how to do it
That is useless in this situation as it relies on the fact you have admin access to the server. Not having admin access basically means you are screwed for .htm files, as the .net method will not trap them.

I'm sure others will find it useful however.

The only resolution here is to implement a custom 404 error handler in ASP, or .net and to scrape the requested url, analyse it and deal with it in script - ultimately issuing a 301 redirect that way.

Anyway, wgrasty'ss problem has now been resolved with the above method
__________________
Rob - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives

Last edited by Rob; February 15th, 2007 at 09:28 PM..
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 4th, 2007, 11:48 AM   #10
New Member
 

Join Date: Jun 2007
Location: Macedonia
Age: 38
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Rostok is on a distinguished road
Re: 301 redirect on windows server (not asp)?

You should try this ASP script(s).
http://evolvedcode.net/content/code_smart404/
for handling the custom 404 error messages, which means basically that you should delete/rename your old files and this script will redirect them to the new ones. Works for .htm or .html as well.
Rostok is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 25th, 2008, 09:38 AM   #11
New Member
 

Join Date: Mar 2008
Location: Paris
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 annanilova is on a distinguished road
Question Re: 301 redirect on windows server (not asp)?

Quote:
Originally Posted by benbramz View Post
Code:
<% 
Response.Status = "301 Moved Permanently" 
Response.addheader "Location", "http://www.yourdomain.com/newpageurl/" 
Response.End 
%>
I am on a Windows server, too, and would like to use this code to redirect one of my HTML pages. Could someone explain WHERE should I insert this code? What should be the file's name and extension and where should it be placed? Sorry for a "stupid" question, I am a complete newbee.
annanilova is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old July 9th, 2009, 06:51 PM   #12
New Member
 

Join Date: Jul 2009
Location: Seattle, Washington
Age: 21
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Bspencer11 is on a distinguished road
Re: 301 redirect on windows server (not asp)?

Quote:
Originally Posted by annanilova View Post
I am on a Windows server, too, and would like to use this code to redirect one of my HTML pages. Could someone explain WHERE should I insert this code? What should be the file's name and extension and where should it be placed? Sorry for a "stupid" question, I am a complete newbee.
I am also a complete noob, and don't know where to put this code. Plus, will it even work on an html page, or does i need to be ASP?
Bspencer11 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 4th, 2009, 12:11 PM   #13
New Member
 

Join Date: Nov 2009
Location: UK
Age: 49
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 adw1104 is on a distinguished road
Re: 301 redirect on windows server (not asp)?

If anyone can tell me WHERE this useful code snippet has to go to enable redirects on a windows server I would be very grateful.

I have already tried pasting it inside the <head></head> tags of the old page - didn't work.
Then I tried deleting all the code from the old page and left only the code snippet - that didn't work.

My hosting support say that scripting issues are none or their concern and just send me links to unhelpful web pages.

Please, if anyone can help me save my rankings that have taken me four years to build I would be most grateful. Truly I would.

I have been trying for two days to get this apparently simple little job done.

Thanks in advance
adw1104 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
301 , redirect , windows , server , asp


LinkBacks (?)
LinkBack to this Thread: http://webforumz.com/classic-asp/5742-301-redirect-on-windows-server-not.htm
Posted By For Type Date
wgrasty's bookmarks on del.icio.us This thread Refback February 14th, 2007 03:17 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
windows or linux server??? Gerry The Café 11 March 30th, 2008 08:09 PM
Help using MySql on windows server 2003 TheThrock Databases 7 August 29th, 2006 02:54 PM
Quality UK Windows/SQL Server hosting required D3mon Web Hosting and Domains 8 August 19th, 2005 04:22 PM
Can ASP run on a apache web server on a windows xp home edit jperson19468 Classic ASP 9 August 8th, 2004 07:45 AM


Search Engine Optimization by vBSEO 3.2.0 RC8