Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 23rd, 2006, 10:33 PM   #1
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
Arrow Automatic Redirection?

I have searched different search engines but could not find anything on this.... :-?
I even tried Microsoft's Knoweledge Base.....

Say I have a website listed at http://www.websitename.domainname
hosted on IIS 5.0

and I have a folder called "folder1" which has a index.htm file.

For some odd reasons, I have to rename "folder1" as "folder2" ....

Most search engines I have submitted my website have the following link...
http://www.websitename.domainname/folder1

How do I automatically redirect a request directly, if the user clicks on the above link in the search engine ?
java_roshan is offline   Reply With Quote
Old Mar 23rd, 2006, 11:40 PM   #2
jaeusm
Programmer
 
jaeusm's Avatar
 
Join Date: Feb 2006
Location: Columbus, OH
Posts: 84
Rep Power: 3 jaeusm is on a distinguished road
<head>
<META HTTP-EQUIV="Refresh"
      CONTENT="0; URL=http://redirect.to.your.website.com">
</head>
jaeusm is offline   Reply With Quote
Old Mar 24th, 2006, 8:56 AM   #3
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
Quote:
Originally Posted by jaeusm
<head>
<META HTTP-EQUIV="Refresh"
      CONTENT="0; URL=http://redirect.to.your.website.com">
</head>
The code written above is absolutely perfect for redirection.
But I suppose, you did not understand my question clearly.

In other words, this is not the answer to my question.
java_roshan is offline   Reply With Quote
Old Mar 24th, 2006, 9:05 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Instruct your server to redirect it. For instance, if you surf to http://www.dawei.biz you will find yourself at http://www.daweidesigns.com.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Mar 24th, 2006, 9:42 AM   #5
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
Quote:
Originally Posted by DaWei
Instruct your server to redirect it. For instance, if you surf to http://www.dawei.biz you will find yourself at http://www.daweidesigns.com.
How do I do that for IIS 5.0..or 6.0
with ASP...?
java_roshan is offline   Reply With Quote
Old Mar 24th, 2006, 10:19 AM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Whadda ya want? Egg in your beer?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Mar 24th, 2006, 11:42 PM   #7
java_roshan
Professional Programmer
 
Join Date: Mar 2005
Location: Student of University of Mumbai, Maharashtra State, India
Posts: 344
Rep Power: 4 java_roshan is on a distinguished road
Quote:
Originally Posted by DaWei
Whadda ya want? Egg in your beer?
You did not seem to go through the question completely.

I have renamed a folder called "folder1" to "folder2". Now, each search engine has a link called http://www.websitename.domainname/folder1 and on clicking on this link, the server will return a 404 error.

Though the page, you have linked me to, mentions about indicating the user what error has occured in a friendly manner and redirect him, to the home page, I think, the server should automate the process of redirecting to appropriate "NEW" pages when there is a 404 error.

like abc.htm was deleted, and instead of it is pqr.htm
so when a request for abc.htm is made, it should automatically redirect to pqr.htm

I hope, now you know what I want!
java_roshan is offline   Reply With Quote
Old Mar 25th, 2006, 1:58 AM   #8
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 769
Rep Power: 3 Jimbo is on a distinguished road
It seems like you want to have abc.htm redirect to pqr.htm... What's wrong with having a page that just redirects?
Jimbo is offline   Reply With Quote
Old Mar 25th, 2006, 6:30 AM   #9
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Why not construct an ASP page to send a 301 redirection to the client when they request a file from folder1?
Arevos is offline   Reply With Quote
Old Mar 25th, 2006, 8:13 AM   #10
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You seem to delight in indicating that people didn't read your question. That's pure horse hockey, which is not the same as donkey baseball. On the other hand, perhaps you should read the material provided, and I quote:
Quote:
Server side redirects are done by using a scripting language, such as PHP or ASP. They can also be done by the web server, usually Apache or IIS. Server redirects can be done as a 301 (permanent) or 302 (temporary) HTTP header.
By default, redirects are usually done using the 302 header, which is not usually the preferred method.
Now, if that means nothing to you, neither will Arevos' post, so do some research, or make an offer.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:19 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC