首先说明下先,域名 *.aaaa.com 我已解析到服务器IP上。服务器是独立服务器。现在说问题:  我现在想弄一个网站,其会员主页的原始地址为 http://127.0.0.1/shop/index.php?id=16  ,但为了方面记得原因,我做了伪静态。现在为 http://127.0.0.1/shop/16。伪静态规则为:
  RewriteRule ^/shop/([0-9]+)$ /shop/index\.php\?id=$1  但我现在是想像一些博客一样,设置一个二级域名 username.aaa.com绑定给会员用。不知道要如何搞?
  用伪静态实现?还是要怎么去实现?
  

解决方案 »

  1.   

    DNS能改当然最好否则:
    http://topic.csdn.net/u/20100312/12/ecb8686e-b0fc-4717-8f6f-f0cc549bc381.html
      

  2.   

    我现在写了个httpd.ini文件,二级域名访问是可以了,如http://14.80326.com能访问到http://www.80326.com/shop/index.php?id=14这个实际网页。但现在的问题是,当我从www.80326.com进入网站没问题,但当我浏览过如http://www.80326.com/sale/ 等,或者是更复杂的如:http://www.80326.com/sale/index.php?price=&switch=&room=&cityarea=4&borough_section=&feature=&type=&totalarea=&list_num=&list_order= 等以后,再访问 首页 www.80326.com,首页就会乱了,并不会显示真正index.php的首页内容,而是站内其他乱七八糟的内容,不知道为什么!!!这个折腾了我一个星期了,还是没有搞写,请高手帮帮忙吧!!!!!谢谢了!!现在的httpd.ini如下:
    [ISAPI_Rewrite]# 3600 = 1 hour
    CacheClockRate 3600RepeatLimit 32
    RewriteEngine OnRewriteCond Host: www\.80326\.com   
    RewriteRule (.*) $1 [L]RewriteCond Host: (?!www\.|bbs)([^.]+)\.80326\.com
    RewriteRule ^/ /shop/index\.php\?id=$1$2 [I,L]RewriteRule ^/community/g-([0-9]+)\.html\?*(.*)$ /community/general\.php\?id=$1RewriteRule ^/community/d-([0-9]+)\.html\?*(.*)$ /community/structure\.php\?id=$1 RewriteRule ^/community/p-([0-9]+)\.html\?*(.*)$ /community/photo\.php\?id=$1RewriteRule ^/newHouse/d-([0-9]+)\.html\?*(.*)$ /newHouse/detail\.php\?id=$1RewriteRule ^/newHouse/p-([0-9]+)\.html\?*(.*)$ /newHouse/photo\.php\?id=$1RewriteRule ^/newHouse/s-([0-9]+)\.html\?*(.*)$ /newHouse/structure\.php\?id=$1RewriteRule ^/sale/d-([0-9]+)\.html\?*(.*)$ /sale/detail\.php\?id=$1
    RewriteRule ^/rent/d-([0-9]+)\.html\?*(.*)$ /rent/detail\.php\?id=$1RewriteRule ^/shop/e-([0-9]+)\.html\?*(.*)$ /shop/evaluate\.php\?id=$1
    RewriteRule ^/shop/p-([0-9]+)\.html\?*(.*)$ /shop/profile\.php\?id=$1
    不知道为什么!!真是搞不定呀!!!