473,386 Members | 1,698 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,386 software developers and data experts.

how to do a redirect in HTML ?


I have a simple problem in that I have developed various websites off
of my domain such as:

www.mydomain.com/my-friends-website

I want to be able to have someone register a domain such as

www.somedomain.com and have it point to --www.mydomain.com/my-
friends-website
I guess the site has to be registered through name servers to point
someplace like geocities.com or anyplace free ? What's good for that ?
>From there it can just redirect to my page, but how do you do that in
html ? I have a big thick html book, but did not see redirect listed
in the index.

Is there anyway to do this directly without setting my firends domain
someplace and then redirecting ?

Is it easy to point several domains to the same place ? If I could do
that, perhaps my Rails programs could detect which domain it was
coming from and do the redirects in Rails code which I know how to do
and is easy.

Feb 16 '07 #1
4 2946
On 16 Feb 2007 02:11:30 -0800, "surfivor" <su*****@yahoo.comwrote:
>
I have a simple problem in that I have developed various websites off
of my domain such as:

www.mydomain.com/my-friends-website

I want to be able to have someone register a domain such as

www.somedomain.com and have it point to --www.mydomain.com/my-
friends-website
Do you have cPanel and add-on domains enabled on your server ? If so,
it is easy to setup the extra domain name and have it refer to a
directory in your file space.

--
Steven
Feb 16 '07 #2
On Fri, 16 Feb 2007, surfivor wrote:
From there it can just redirect to my page, but how do you do that in
html ? I have a big thick html book, but did not see redirect listed
in the index.
You don't do redirects with HTML.
Read http://www.w3.org/QA/Tips/reback .
Feb 16 '07 #3

Hello

I just use this :

On the page My_label_vin to redirect to lecteur-flux-rss :

<p style="text-align: center;">You will be directed to :<a
href="http://philippe.chappuis.googlepages.com/lecteur-flux-
rss.htm">http://philippe.chappuis.googlepages.com/lecteur-flux-
rss.htm</a></p>

<script language="javascript" type="text/javascript">
window.location="http://philippe.chappuis.googlepages.com/lecteur-flux-
rss.htm";
</script><noscript>Redirection vers http://philippe.chappuis.googlepages...r-flux-rss.htm
la page du lecteur de flux RSS</noscript>

hope this help you

---
http://philippe.chappuis.googlepages.com
---

Feb 17 '07 #4
Dan
On Feb 17, 9:47 am, "prac" <philippe.chapp...@gmail.comwrote:
On the page My_label_vin to redirect to lecteur-flux-rss :

<p style="text-align: center;">You will be directed to :<a
href="http://philippe.chappuis.googlepages.com/lecteur-flux-
rss.htm">http://philippe.chappuis.googlepages.com/lecteur-flux-
rss.htm</a></p>

<script language="javascript" type="text/javascript">
window.location="http://philippe.chappuis.googlepages.com/lecteur-flux-
rss.htm";
</script><noscript>Redirection vershttp://philippe.chappuis.googlepages.com/lecteur-flux-rss.htm
la page du lecteur de flux RSS</noscript>
I'm not sure why the paragraph at the top is in English but the
noscript element content is in French, but anyway, that's a rather
clumsy way to do something that could be done much more elegantly with
a server-side redirect (e.g., with .htaccess in Apache servers). Or,
better yet, get a hosting account that actually lets you host sites
directly under the domains that correspond to them so that no clunky
redirects are needed at all. (Dreamhost currently lets you have
unlimited domains and subdomains, all fully hosted, within a single
account.)

--
Dan

Feb 18 '07 #5

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

Similar topics

10
by: Bob Garbados | last post by:
forgive my ignorance, as I'm new to php coming from a ms background... If I create a page named redirect.php and it's only content is: <?php header("Location: http://www.google.com"); ?>...
11
by: Alex Hunsley | last post by:
A question that has certainly been asked before and I've googled etc. for answers with no certain outcome... I'd like my PHP script to redirect the client browser to another page, POSTing some...
2
by: bagsmode | last post by:
Hi, I'm trying to set a session cookie and then redirect, however I get the error: Status: 302 Moved Location: /index.cgi I thought I recall getting an error like this when I first tried...
1
by: carussell23 | last post by:
Is it possible to execute a batch file on the webserver and redirect to an html document at the same time using javascript?
1
by: sc | last post by:
I am generating some nested DataLists, but instead of displaying them on the client browser, I want to save the output HTML stream to an on-disk file in %temp%. What is the best way to do that?...
2
by: news://news.microsoft.com/microsoft.public.de.germ | last post by:
Hallo! Ich habe ein Frameset mit 3 Frames. Im 1. Frame wird eine ASPX-Seite geöffnet. In dieser werden einige Steuerelemente angezeigt. Nun soll bei bestimmten Benutzeraktivitäten eine andere...
1
by: mvr | last post by:
Hi all I was using Response.Redirect for ASP pages, and <META HTTP-EQUIV="Refresh" CONTENT="5; URL=html-redirect.html"to redirectand html page. Is there any we can redirect a pdf document from...
4
by: DGS | last post by:
Hi guys, Not a developer, but an admin so please pardon my ignorance. I have an issue that I was hoping to get help with. What I need is for the front page of my site to capture the URL that...
56
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain variables to their webforms through a form on my...
8
by: Darrel | last post by:
I'm helping convert a 300+ page .html site into an ASP.net site. The client wants to set up 301 redirects for all of the old html pages. I've used ISAPI for this type of thing in the past, as it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.