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

asp.net domain alias.. redirectors

Hi,

Does anyone know if it's possible to do the following in IIS using ASP.NET.

For example to setup aliases user1, user2, and user3

http://www.mydomain.com/user1
http://www.mydomain.com/user2
http://www.mydomain.com/user3

all calling http://www.mydomain.com/default.aspx

and extracting the user1..3 within default.aspx page?

Thank you
Maziar A.


Nov 17 '05 #1
1 1134
sure, what you would need to do is rewrite the incoming url from your
application_beginRequest handerl in the global asax file
Here is a how you do it
void Application_beging blah blah blah
{

//set a pointer to current
HttpContext incoming = HttpContext.Current;
string oldpath = incoming.Request.Path.ToLower ();

//add your code in here to switch http://www.mydomain.com/default.aspx

//to whatever you want
//when done call this

context.RewritePath (newpath);

}

You would kneed to know how to differentiate the urls, so i suggest you use
a querystring param to do so.

regards

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Maziar Aflatoun" <ma***@rogers.com> wrote in message
news:uH********************@news04.bloor.is.net.ca ble.rogers.com...
Hi,

Does anyone know if it's possible to do the following in IIS using ASP.NET.
For example to setup aliases user1, user2, and user3

http://www.mydomain.com/user1
http://www.mydomain.com/user2
http://www.mydomain.com/user3

all calling http://www.mydomain.com/default.aspx

and extracting the user1..3 within default.aspx page?

Thank you
Maziar A.

Nov 17 '05 #2

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

Similar topics

0
by: Mike Curry | last post by:
I have been looking for a way to automatically add a domain to IIS in the SMTP settings through code and have come up with nothing. What I want to do is type in a domain into a VB.Net form and...
7
by: Peter Steele | last post by:
I have code to add a domain user to a local group but I'm not sure if it will work with NT domains or whether it will only work with Active Directory based systems. Here's the code: public void...
3
by: Jeff Waskiewicz | last post by:
Hello, I think the subject says it all I am trying to return a list of domain names to later display in a combobox. I found a number of VB6 samples that show how to do this using the...
4
by: Jim Carlock | last post by:
$_SERVER returns the root path for the subdomain, which is different than the root path for the primary domain. Is there a global variable to get the path for the root domain? What's the best...
0
by: Mahesh K. Anajni | last post by:
Hi We are working on a multilingual website. it has five URL (one original and four alias) for all the five languages. we are using RewriterRule in web.config to rewrite the Url. All this...
3
by: vinceweeks | last post by:
Hello all, Please forgive me if this is a simple question - I'm new. I'm using Javascript to create an XmlHttpRequest object to allow client pages to call PHP scripts on a server. IPs in the...
0
by: ajayindelhi | last post by:
Hi, I have two user accounts in the format: <domain>\<alias> and <fully qualified domain name>\<alias>
4
by: vivekcyrus | last post by:
Hi. im using Windows xp and IIS 5.1 on a single machine. I created a new domain in IIS, did all the configurations but still i cannot send or receive mails on the new domain. the mails are either...
2
by: Dooza | last post by:
Hi there, Using classic ASP I want to check if a username and password are correct before passing the details on to an object (stocktake module) that uses them to authenticate the object. The...
3
by: asaffos | last post by:
Hi, I have a website (PHP+MYSQL) allowing customers to build mini sites. The mini sites are created in a subdomain. The problem is some of these customers want to use their own domain instead...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...

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.