Home  >  Article  >  Backend Development  >  php 城市站怎么配置

php 城市站怎么配置

WBOY
WBOYOriginal
2016-06-13 13:13:281049browse

php 城市站如何配置
如题,请教大神。
例: hefei.web.com
据说神马url重写:hefei.web.com=>web.com?ctiy=hefei,请教怎么写。
还有就是如果这样apache怎么配呢,是将所有*.web.com都指向web.com的这个目录?



------解决方案--------------------
方法一,

1.解析多个城市域名
2.RewriteRule ^hefei.web.com$ /web.com?ctiy=hefei
apache不用配


方法二,

1.域名泛解析
2.RewriteRule ^(.*).web.com$ /web.com?ctiy=$1
3。apache ServerAlias *.web.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn