如何重写这个cityNames.mywebsite.com的网址? [英] how to rewrite urls like this cityNames.mywebsite.com ?

查看:63
本文介绍了如何重写这个cityNames.mywebsite.com的网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友



我正在开发一个由visual studio 2010开发的网站,这是一个商店,它正在销售来自不同城市的商品,我需要重写不同的网址对于每个城市,如http://london.mywebsite.com,http://paris.mywebsite.com ......

如何做到这一点?它是一个网址重写还是我应该购买不同的域名?



谢谢

解决方案

你只需要注册(购买)域名mywebsite.com。子域名(例如paris.mywebsite.com,london.mywebsite.com)是您的域名服务器中的条目。您可以根据需要创建任意数量的子域,无需额外费用。所有子域都可以指向相同的IP地址,或者每个子域都可以指向唯一的IP地址。



在Visual Studio帮助索引中,查看HttpRequest.RawUrl属性和HttpRequest.Url属性。您的Web应用程序可以查看用于访问您的应用程序的URL。您可以拥有一个使用子域名的Web服务器应用程序来确定如何显示页面。这可能比每个子域的单独Web服务器应用程序更容易支持。


您好,

Url重写是重写您当前的URL,但是根据您的需要我认为你的需要是通过子域完成的。


你好专业人士







通过制作子域名,你可以根据需要使用它。





乐于助人!!! / BLOCKQUOTE>

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

解决方案

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.


Hi,
Url rewritting is to rewrite your current url, but as your need i think that your need is done by subdomain.


hello professional

yes

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


Happy to help!!!


这篇关于如何重写这个cityNames.mywebsite.com的网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆