By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,012 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

URL Rewriting at Domain level

P: n/a
The first scenario is that I want to create one website for a particular
industry - let's say for Farm Machinery

so I have a shared hosting site called myFarmMachinery.com

But I want to sell site creation, using database page creation to multiple
companys who generally have their own domain name.

So, then, these domains, I need to forward to my one IP address for
myFarmMachinery.com
JohnsEquipment.com = John
MarksNewEquipment.com = Mark

Is there anyway to make it rewrite to:
myFarmmachinery.com/john
myFarmmachinery.com/mark
etc

Then, depending on the url, there, the database will show company specific
details, but the sites will be based on one basic site.(I have no problem
with designing it, database wise, I'm just looking for an alternate way to
set it up with the urls

the alternate scenario is that they don't have a domain name and are not
getting one - - but I still want it to look like:
myFarmmachinery.com/john
myFarmmachinery.com/mark

but I don't want to use querystrings

What's the best approach for something like this?
Sep 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
sp1 for .net 3.5 contains the url rewriter support you need (url
routing). your rewrite code will need to look at the host header (sent
by the browser) to determine the rewrite path. unless your using iis
7.0, you will need to map all content to asp.net for the rewriter to
process non asp.net pages requests (like images)
this could also be done with an isapi filter easily. you could buy a 3rd
party one if you are unable to code in c/c++

-- bruce (sqlwork.com)
Seth Williams wrote:
The first scenario is that I want to create one website for a particular
industry - let's say for Farm Machinery

so I have a shared hosting site called myFarmMachinery.com

But I want to sell site creation, using database page creation to multiple
companys who generally have their own domain name.

So, then, these domains, I need to forward to my one IP address for
myFarmMachinery.com
JohnsEquipment.com = John
MarksNewEquipment.com = Mark

Is there anyway to make it rewrite to:
myFarmmachinery.com/john
myFarmmachinery.com/mark
etc

Then, depending on the url, there, the database will show company specific
details, but the sites will be based on one basic site.(I have no problem
with designing it, database wise, I'm just looking for an alternate way to
set it up with the urls

the alternate scenario is that they don't have a domain name and are not
getting one - - but I still want it to look like:
myFarmmachinery.com/john
myFarmmachinery.com/mark

but I don't want to use querystrings

What's the best approach for something like this?

Sep 27 '08 #2

P: n/a
But I want to sell site creation, using database page creation to
multiple
companys who generally have their own domain name.
Then, depending on the url, there, the database will show company
specific
details, but the sites will be based on one basic site.(I have no
problem
with designing it, database wise, I'm just looking for an alternate way
to
set it up with the urls
You need to use URL rewriting or url mapping. It is not the same. Look at:
http://longurl.net/URLRewritingASPNET.aspx for asp.net url rewriting
tutorial and tools (add-ons). If you need url mapping instead url rewriting,
than you can do this in asp.net without add-ons, but url rewriting you can
not do in asp.net without 3rd party components.
Sep 29 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.