Click here to Skip to main content
15,905,028 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello friends

I'm developing a website by visual studio 2010, it's a shop, and it's selling goods from different cities and I need to rewrite different urls for each city like http://london.mywebsite.com , http://paris.mywebsite.com ...
how to do that ? is it a url rewriting or I should buy different domains ?

thank you
Posted
Updated 6-Oct-13 2:20am
v2
Comments
Sampath Lokuge 6-Oct-13 5:15am    
Is this Asp.net web forms or MVC app ?
Neema Derakhshan 6-Oct-13 7:03am    
thank you for response
asp.net web forms
waleedquwaider 6-Oct-13 5:29am    
i guess you need to make sub domain for each country/city ..
Neema Derakhshan 6-Oct-13 7:05am    
thank you for response
i'll search about it
Neema Derakhshan 7-Oct-13 5:39am    
dear waleedquwaider ,you are right ,please submit your answer and I'll accept it.

You only need to register (buy) the domain "mywebsite.com". The subdomains (e.g. paris.mywebsite.com, london.mywebsite.com) are entries in your Domain Name Server. You can make as many subdomains as you want with no extra cost. All subdomains can point to the same IP Address or each subdomain can point to a unique IP Address.

In the Visual Studio Help index, review the HttpRequest.RawUrl property and HttpRequest.Url property. Your web application can look at the URL that was used to access your application. You may be able to have one web server application that uses the subdomain name to determine how to display pages. That might be easier to support than a separate web server application for each subdomain.
 
Share this answer
 
Hi,
Url rewritting is to rewrite your current url, but as your need i think that your need is done by subdomain.
 
Share this answer
 
hello professional

yes

by making sub domain you can use it as your need..


Happy to help!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900