473,698 Members | 2,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

subdomain url rewriting?

Is it possible to allow my website user's to enter the site using a
subdomain name such
johndoe.mywebsi te.com then a automated script in the Global.asax file within
the
Application_Beg inRequest redirect the user to
mywebsite.com/index.aspx?user name=johndoe?
if so then how?

I kind of know how to perform this task with vanity url's such as
mywebsite.com/johndoe, but not
subdomain name. Thanks!
Nov 19 '05 #1
2 2399
Set up an HTTP Handler to do this for you. The following article gives an
example you should be able to tailor for your needs:

http://www.ftponline.com/vsm/2002_02...a/default.aspx

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************
"Leon" wrote:
Is it possible to allow my website user's to enter the site using a
subdomain name such
johndoe.mywebsi te.com then a automated script in the Global.asax file within
the
Application_Beg inRequest redirect the user to
mywebsite.com/index.aspx?user name=johndoe?
if so then how?

I kind of know how to perform this task with vanity url's such as
mywebsite.com/johndoe, but not
subdomain name. Thanks!

Nov 19 '05 #2
it done with iis. there are two methods

1) each dns entry get a unique ip address. in this case iis setup with
multiple ippaddress and each ipaddress is a unque site.

2) using http 1.1, all dns entries get the same ipaddress, and a website is
setup for each subdomain name use the host header.

-- bruce (sqlwork.com)

"Leon" <vn*****@msn.co m> wrote in message
news:Ov******** ******@TK2MSFTN GP09.phx.gbl...
Is it possible to allow my website user's to enter the site using a
subdomain name such
johndoe.mywebsi te.com then a automated script in the Global.asax file
within the
Application_Beg inRequest redirect the user to
mywebsite.com/index.aspx?user name=johndoe?
if so then how?

I kind of know how to perform this task with vanity url's such as
mywebsite.com/johndoe, but not
subdomain name. Thanks!

Nov 19 '05 #3

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

Similar topics

4
2452
by: Leon | last post by:
Is it possible to allow my website user's to enter the site using a subdomain name such johndoe.mywebsite.com then a automated script in the Global.asax file within the Application_BeginRequest redirect the user to mywebsite.com/index.aspx?username=johndoe? if so then how? I kind of know how to perform this task with vanity url's such as mywebsite.com/johndoe, but not
2
2290
by: Leon | last post by:
How do I point a sub-domain to a sub-directory or .aspx page of my site using asp.net? I'm using a shared hosting service, that does not offer subdoman forwarding. however, you can write your own asp.net redirect code, and I just want to the best way to accomplish this task. it's possible that I may could have a 1000 subdomain names to redirect, but within the same application, to the same page
1
2281
by: perspolis | last post by:
Hi If I want to create subdomain for my site dynamicaly how can I do that with ASP.NET? or is it possib;e to create subdomain with IIS?? thanks
1
2487
by: thomas | last post by:
Hello all, It seems like subdomain forwarding prevents ASP.Net session state from working correctly. Example: two websites http://www.jgphotographers.com/test and http://picturestore.newpicturestore.com/test - the first one works - the counter using session state increases every time the button is clicked. The second one uses subdomain forwarding with masking. The "picturestore"
0
1700
by: Greg | last post by:
Is it possible for authentication using asp.net membership to persist from a site to a subdomain? The scenario I want to provide is: User browses to the page somesite.com and logs in. User clicks on link that points to the subdomain demo/somesite.com. Is it possible to retain the authentication information for the subdomain, so that there is no need to log in again?
12
3057
by: Tina | last post by:
Our company domain, say, wombat.com needs to create several subdomains: support, training, and purchase are three of the subdomains needed. So when someone browses to //training.wombat.com they will be directed to the IP we have assigned. I have two questions: 1. how can I do this at design time? 2. how can I do this at run time from my asp.net code? Thanks,
3
33672
by: a2rodger | last post by:
I am using the following function and parse_url() to attempt to grab the subdomain from my sites url function selfURL() { $s = empty($_SERVER) ? '' : ($_SERVER == "on") ? "s" : ""; $protocol = strleft(strtolower($_SERVER), "/").$s; $port = ($_SERVER == "80") ? "" : (":".$_SERVER); return $protocol."://".$_SERVER.$port.$_SERVER; } function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); } $url = selfURL(); $uri =...
0
2157
by: devilsjunk | last post by:
Hello Everybody, In my web application I have created an interface where, if any user register then a subdomain will be created with the user name of the user link this manner E.G. :- http://subdomain.domain.com This works fine. Now if any user name contains special character like underscore then the subdomain only takes the character before underscore. For example if I register with devils_acc06 then the created subdomain URL is...
1
1689
by: Josh | last post by:
I have a question about subdomains. I would like my website to have subdomains that essentially show my regular main website, except that the subdomain passes as a variable on all pages so that I can use the subdomain as a variable to customize details. For example, the home page at www.thesite.com would have a set of information displayed, but the subdomain (subdomain.thesite.com) would display certain additional details. Am I...
0
8685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.