1
xueming
any way to map a long url to a sub domain
  • 2005/5/22 23:50

  • xueming

  • Not too shy to talk

  • Posts: 127

  • Since: 2005/2/7 6


Hello,

I try to map this long URL:

http://www.mydomain.com/modules/mylinks/visit.php?cid=1&lid=1

to a subdomain like:

http://link1.mydomain.com/

So when I type http://link1.mydomain.com, it will either show the content of http://www.mydomain.com/modules/mylinks/visit.php?cid=1&lid=1 (the best) or redirect to http://www.mydomain.com/modules/mylinks/visit.php?cid=1&lid=1

Is there any way to do it?

Thank you in advance.

2
smdcom
Re: any way to map a long url to a sub domain

are you using cpanel? if yes, you can use redirection function in cpanel...

if not, you can make index.html in link1.yourdomain.com and use http redirect.

3
pegasus00321
Re: any way to map a long url to a sub domain

You can always create the subdomain and frame the page?
Probably redirect works best
header('Location: http://www.mydomain.com/modules/mylinks/visit.php?cid=1&lid=1');
?>

4
xueming
Re: any way to map a long url to a sub domain
  • 2005/5/23 7:00

  • xueming

  • Not too shy to talk

  • Posts: 127

  • Since: 2005/2/7 6


Thank you both for the quick response!!

I have tried two approaches:
1. redirect as you suggested. I don't use cpanel, so I put the location in the index.php page. It works fine except it showed redirected URL after redirection.

2. I used iframe to put the long URL page into index.html of the subdomain page. This way, it only show the subdomain address, but then when I click something else in the page, since it is inside a frame, even it showed another page it still show the subdomain address :)

Compare them I think redirect is better.

But is any other options ?

Login

Who's Online

356 user(s) are online (272 user(s) are browsing Support Forums)


Members: 0


Guests: 356


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits