Web Design and Development Forums

301 redirect on windows server (not asp)?

This is a discussion on "301 redirect on windows server (not asp)?" within the ASP Forum section. This forum, and the thread "301 redirect on windows server (not asp)? are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > ASP Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack (1) Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.
Old Mar 22nd, 2006, 19:33   1 links from elsewhere to this Post. Click to view. #1 (permalink)
Junior Member
 
Join Date: Nov 2005
Age: 39
Posts: 22
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 Mar 23rd, 2006, 00:10   #2 (permalink)
Highly Reputable Member
 
Join Date: May 2005
Location: U.K
Age: 21
Posts: 836
Send a message via MSN to benbramz
Re: 301 redirect on windows server (not asp)?

Code: Select all
<% 
Response.Status = "301 Moved Permanently" 
Response.addheader "Location", "http://www.yourdomain.com/newpageurl/" 
Response.End 
%>
__________________
Webradiance - My home
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 Mar 23rd, 2006, 12:00   #3 (permalink)
Junior Member
 
Join Date: Nov 2005
Age: 39
Posts: 22
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 Mar 23rd, 2006, 15:46   #4 (permalink)
Highly Reputable Member
 
Join Date: May 2005
Location: U.K
Age: 21
Posts: 836
Send a message via MSN to benbramz
Re: 301 redirect on windows server (not asp)?

np
__________________
Webradiance - My home
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 Feb 14th, 2007, 18:25   #5 (permalink)
New Member
 
Join Date: Feb 2007
Location: Charlotte, NC
Posts: 1
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 Feb 14th, 2007, 20:13   #6 (permalink)
Rob
Head Admin & CEO
 
Rob's Avatar
 
Join Date: Jul 2003
Location: bug busting new style
Age: 34
Posts: 3,311
Blog Entries: 7
Send a message via MSN to Rob Send a message via Skype™ to Rob
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 Collyer - SEO Specialist (8 years+)
Owner & Founder of Webforumz.com

My Mrs's site:- Student Midwife Forums

I am currently unavailable for private work
-------------------------------------------------
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 Feb 15th, 2007, 15:33   #7 (permalink)
Moderator
 
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,612
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
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.
__________________
Moof! | http://mevans76.com
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 Feb 15th, 2007, 16:14   #8 (permalink)
Junior Member
 
Join Date: Jan 2007
Location: Manchester
Posts: 11
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 Feb 16th, 2007, 00:22   #9 (permalink)
Rob
Head Admin & CEO
 
Rob's Avatar
 
Join Date: Jul 2003
Location: bug busting new style
Age: 34
Posts: 3,311
Blog Entries: 7
Send a message via MSN to Rob Send a message via Skype™ to Rob
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 Collyer - SEO Specialist (8 years+)
Owner & Founder of Webforumz.com

My Mrs's site:- Student Midwife Forums

I am currently unavailable for private work
-------------------------------------------------

Last edited by Rob; Feb 16th, 2007 at 00:28.
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 Jun 4th, 2007, 14:48   #10 (permalink)
New Member
 
Join Date: Jun 2007
Location: Macedonia
Age: 36
Posts: 1
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 Mar 25th, 2008, 11:38   #11 (permalink)
New Member
 
Join Date: Mar 2008
Location: Paris
Posts: 1
Question Re: 301 redirect on windows server (not asp)?

Quote:
Originally Posted by benbramz View Post
Code: Select all
<% 
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
Reply

Tags
301, redirect, windows, server, asp

Thread Tools
Rate This Thread
Rate This Thread:

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help using MySql on windows server 2003 TheThrock MySQL 7 Aug 29th, 2006 17:54
URGENT!!!! Send HTTP request from one web server to another server chandra.nowduri ASP.NET Forum 1 Aug 7th, 2006 19:18
Quality UK Windows/SQL Server hosting required D3mon Hosting & Domains 8 Aug 19th, 2005 19:22
Can ASP run on a apache web server on a windows xp home edit jperson19468 ASP Forum 9 Aug 8th, 2004 10:45



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 05:43.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59