# HTML: How can I redirect from one URL to a subdirectory of another?

**URL:** <https://boards.straightdope.com/t/html-how-can-i-redirect-from-one-url-to-a-subdirectory-of-another/116480>\
**Category:** Factual Questions\
**Created:** [June 29, 2002, 12:10am UTC](https://boards.straightdope.com/t/html-how-can-i-redirect-from-one-url-to-a-subdirectory-of-another/116480 "2002-06-29T00:10:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beadalin](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@Beadalin](https://boards.straightdope.com/u/Beadalin)\
**Post date:** [June 29, 2002, 12:10am UTC](https://boards.straightdope.com/t/html-how-can-i-redirect-from-one-url-to-a-subdirectory-of-another/116480/1 "2002-06-29T00:10:24Z")

</div>

I think what I need is along the lines of a meta refresh-type thing. Here’s what I’ve got going on:

1. I built a site for an event my company is hosting, which resides here: www.mycompany/eventname/index.htm

2. I registered a domain name for the event: [www.eventname.com](http://www.eventname.com)

**So…**  
How can I make visitors who type in the URL [www.eventname.com](http://www.eventname.com) go straight to [www.mycompany.com/eventname/index.htm](http://www.mycompany.com/eventname/index.htm) ?

I know it’s possible, but my HTML book and web searches aren’t turning up anything. Anyone know any HTML magic that will make this happen?

---

<div class="post-metadata">

**Author:** ![Linear\_Crack](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@Linear\_Crack](https://boards.straightdope.com/u/Linear_Crack)\
**Post date:** [June 29, 2002, 12:29am UTC](https://boards.straightdope.com/t/html-how-can-i-redirect-from-one-url-to-a-subdirectory-of-another/116480/2 "2002-06-29T00:29:41Z")

</div>

> [@](#):
>
> \*Originally posted by Beadalin \*  
> \*\*I think what I need is along the lines of a meta refresh-type thing. Here’s what I’ve got going on: \*\*

Try this…

\<HTML\>  
\<HEAD\>  
\<TITLE\>Type the title of your page here\</TITLE\>  
\<META HTTP-EQUIV=“refresh” CONTENT=“10; url=  
[http://www.mycompany.com/eventname/index.html](http://www.mycompany.com/eventname/index.html)”\>

\</HEAD\>  
\<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff"  
VLINK="#808080" alink="#ff0000" marginheight=“0” marginwidth=“0”  
topmargin=“0” leftmargin=“0”\>

\<br\>  
\<div align=“center”\>  
\<h3\>Just one moment please …\</h3\>

\<p\>You will be redirected in a few moments or you can \<a href="  
[http://www.mycompany.com/eventname/index.html](http://www.mycompany.com/eventname/index.html)"\>click here to  
continue\</b\>\</a\>

\</div\>

\</BODY\>  
\</HTML\>

---

<div class="post-metadata">

**Author:** ![xash](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xash](https://boards.straightdope.com/u/xash)\
**Post date:** [June 29, 2002, 3:02am UTC](https://boards.straightdope.com/t/html-how-can-i-redirect-from-one-url-to-a-subdirectory-of-another/116480/3 "2002-06-29T03:02:50Z")

</div>

there are two ways (atleast) to do this.

**the expensive way: [sub-domain pointers]**

get the website hosting company of [mycompany.com](http://mycompany.com) to offer you and setup a sub-domain pointer for [mycompany.com/eventname](http://mycompany.com/eventname)

e.g. sub-domain pointer [www.eventname.com](http://www.eventname.com) points to [www.mycompany.com/eventname](http://www.mycompany.com/eventname)

some hosting companies do not offer this service, some offer it for a fee.

**the free way 🙂 : [url forwarding]**

i had the same issue when i setup my site… and this is how i did it…

go to [www.mydomain.com](http://www.mydomain.com) and sign up. no really, that’s the website address, not an example 🙂

transfer the hosting (not the registrar) of [www.eventname.com](http://www.eventname.com) to [www.mydomain.com](http://www.mydomain.com)’s service. how this is done is explained on their site.

once the domain is transferred to [mydomain.com](http://mydomain.com) (about 48 hrs) , login to the control panel and setup domain forwarding. [www.eventname.com](http://www.eventname.com) will now point to [www.mycompany.com/eventname](http://www.mycompany.com/eventname)

this method is simple, efficient and free. i have used the service for over 2 years and therefore can vouch for their reliability and level of service.

so that you understand how it’s done, i shall link my site here:

my problem was i couldn’t afford hosting space… so i got some space on [www.ideadutch.com/notcomguys](http://www.ideadutch.com/notcomguys)

and i registered the domain name [www.notcomguys.com](http://www.notcomguys.com)

now i wanted [www.notcomguys.com](http://www.notcomguys.com) to resolve to [www.ideadutch.com/notcomguys/index.htm](http://www.ideadutch.com/notcomguys/index.htm)

i also had an additional requirement… i needed this to be done without the reader seeing [www.ideadutch.com/notcomguys](http://www.ideadutch.com/notcomguys) in the url bar when s/he comes to my site. i needed the url bar to display [www.notcomguys.com](http://www.notcomguys.com)

this is done by using a feature called stealth forwarding in the control panel options of [mydomain.com](http://mydomain.com)

so here’s my site… you can see the end result:

[http://www.notcomguys.com](http://www.notcomguys.com)

(note how it’s hosted on another site’s subdirectory)

if you have any further questions, lemme know…

---

<div class="post-metadata">

**Author:** ![xash](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xash](https://boards.straightdope.com/u/xash)\
**Post date:** [June 29, 2002, 3:06am UTC](https://boards.straightdope.com/t/html-how-can-i-redirect-from-one-url-to-a-subdirectory-of-another/116480/4 "2002-06-29T03:06:25Z")

</div>

addendum:

you also get full use of any number of [anyemailaddress@eventname.com](mailto:anyemailaddress@eventname.com)

so you can setup email addresses such as [info@eventname.com](mailto:info@eventname.com), [register@eventname.com](mailto:register@eventname.com) etc.
