473,322 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

redirection

lam
I'm wondering if there is an easy way to implement a redirection.
For example: http://test.com/redirect would redirect to
http://test.com/redirect.aspx
In the past, I have to implement redirect as a virtual directory under
test.com and have redirect logic to redirect.aspx. But this seems like
a lot of work involved.

Thanks,
Lam

Aug 18 '06 #1
5 1325
drop this as a default.htm file into the virtual directory.

<HTML>
<HEAD>
<!-- Send users to the new location. -->
<TITLE>redirect</TITLE>
<META HTTP-EQUIV="refresh"
CONTENT="10;URL=http://www.netmechanic.com">
</HEAD>
<BODY>
This page has moved. You will be
automatically redirected
to its new location in 10 seconds.
If you aren't forwarded
to the new page,
<a href="http://www.netmechanic.com">
click here</a>.
</BODY>
</HTML>

Here's a link to the article
http://www.netmechanic.com/news/vol2/html_no5.htm

Aug 18 '06 #2
lam
Thanks.
Actually, I am wondering if we can do away with having to create
virtual directory.
For example, in case of the web site tfd:, if you type:
http://www.tfd.com/computer,
it automatically captures the word: "computer", without having to
create a virtual dir called "computer"
Regards,
Lam
r2thej151 wrote:
drop this as a default.htm file into the virtual directory.

<HTML>
<HEAD>
<!-- Send users to the new location. -->
<TITLE>redirect</TITLE>
<META HTTP-EQUIV="refresh"
CONTENT="10;URL=http://www.netmechanic.com">
</HEAD>
<BODY>
This page has moved. You will be
automatically redirected
to its new location in 10 seconds.
If you aren't forwarded
to the new page,
<a href="http://www.netmechanic.com">
click here</a>.
</BODY>
</HTML>

Here's a link to the article
http://www.netmechanic.com/news/vol2/html_no5.htm
Aug 18 '06 #3
lam,
What you describe is referred to as "URLRewriting".
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"lam" wrote:
Thanks.
Actually, I am wondering if we can do away with having to create
virtual directory.
For example, in case of the web site tfd:, if you type:
http://www.tfd.com/computer,
it automatically captures the word: "computer", without having to
create a virtual dir called "computer"
Regards,
Lam
r2thej151 wrote:
drop this as a default.htm file into the virtual directory.

<HTML>
<HEAD>
<!-- Send users to the new location. -->
<TITLE>redirect</TITLE>
<META HTTP-EQUIV="refresh"
CONTENT="10;URL=http://www.netmechanic.com">
</HEAD>
<BODY>
This page has moved. You will be
automatically redirected
to its new location in 10 seconds.
If you aren't forwarded
to the new page,
<a href="http://www.netmechanic.com">
click here</a>.
</BODY>
</HTML>

Here's a link to the article
http://www.netmechanic.com/news/vol2/html_no5.htm

Aug 18 '06 #4
Thanks.
Actually, I am wondering if we can do away with having to create
virtual directory.
For example, in case of the web site tfd:, if you type:
http://www.tfd.com/computer,
it automatically captures the word: "computer", without having to
create a virtual dir called "computer"
Regards,
Lam
Go into the properties of the website you want to handle the url. On
the WebSite tab click advanced. Now you just add the desired host
header name into the multiple identities for this website area. Now
when a request comes into that machine IIS will send all requests for
that specific URL into the website you defined the header.

Here's an easy example. Note: you will be adding an entry not editing
one.
http://www.tek-tips.com/viewthread.c...3743&page=1447

Hopefully that makes sense...

Aug 18 '06 #5
lam
Actually, what I was looking for is exactly as Peter refered to, "URL
Rewrite."
This would allow me to dynamically redirect pages at runtime by
modifying the configuration file.
Thanks everyone for replying.
Lam
r2thej151 wrote:
Thanks.
Actually, I am wondering if we can do away with having to create
virtual directory.
For example, in case of the web site tfd:, if you type:
http://www.tfd.com/computer,
it automatically captures the word: "computer", without having to
create a virtual dir called "computer"
Regards,
Lam

Go into the properties of the website you want to handle the url. On
the WebSite tab click advanced. Now you just add the desired host
header name into the multiple identities for this website area. Now
when a request comes into that machine IIS will send all requests for
that specific URL into the website you defined the header.

Here's an easy example. Note: you will be adding an entry not editing
one.
http://www.tek-tips.com/viewthread.c...3743&page=1447

Hopefully that makes sense...
Aug 19 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
52
by: Gerard M Foley | last post by:
Can one write a webpage which is not displayed but which simply redirects the user to another page without any action by the user? Sorry if this is simple, but I am sometimes simple myself. ...
15
by: Taki Jeden | last post by:
Hello everybody Does anybody know why w3c validator can not get pages that use 404 htaccess redirection? I set up two web sites so that clients request non-existent urls, but htaccess redirects...
2
by: Nadav | last post by:
Hi, Introduction: *************** I am trying to redirect stdout to a RichEdit control, this is done by initiating a StringWriter, associated it with a StringBuilder and setting the...
0
by: Dimitrios Mpougas | last post by:
Hello, I have two asp.net pages. The first is a page (main.aspx) wich has four links on it. The href value of each link is: href="view.aspx?id=1" traget="_blank" href="view.aspx?id=2"...
8
by: Luciano A. Ferrer | last post by:
Hi! I was following the http://www.seomoz.org/articles/301-redirects.php article, trying to do that with one of my test sites I added this to the .htaccess file: RewriteEngine On RewriteCond...
13
by: souissipro | last post by:
Hi, I have written a C program that does some of the functionalities mentionned in my previous topic posted some days ago. This shell should: 1- execute input commands from standard input,...
1
by: comp.lang.php | last post by:
require_once("/users/ppowell/web/php_global_vars.php"); if ($_GET) { // INITIALIZE VARS $fileID = @fopen("$userPath/xml/redirect.xml", 'r'); $stuff = @fread($fileID,...
4
by: psual | last post by:
hi newbie in web design I got some issue concerning a secure redirection between 2 pages let say I have a page with a grid (the 'master' page) in this grid I can select a record, get its pk...
13
by: Massimo Fabbri | last post by:
Maybe it's a little OT, but I'll give it try anyway.... I was asked to maintain and further develop an already existing small company's web site. I know the golden rule of "eternal" URIs, but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.