会员绑定二级域名和顶级域名的方法,伪静态 destoonB2B



首先在域名管理里添加一条A记录 *.abc.com 指向目标服务器IP

然后在服务器上绑定*.abc.com 至 网站路径/company目录或网站根目录

生效后进入网站后台 网站设置 SEO优化 公司主页绑定二级域名 填写 .abc.com

进入网站后台 功能模块 公司管理 生成网页 更新公司

系统会更新公司的主页地址。

nginx.txt

    DocumentRoot D:/www/www.destoon.com/

    ServerName www.destoon.com

    RewriteEngine On

    ErrorDocument 404 /404.php

    RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php

    RewriteRule ^(.*)/(admin|cache|editor|file|include|lang|module|skin|template)/(.*)\.php(.*)$ /404.php

    RewriteRule ^(.*)-htm-(.*)$ $1.php?$2

    RewriteRule ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show.php?itemid=$2&page=$4

    RewriteRule ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list.php?catid=$2&page=$4

    RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3

    RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3

    RewriteRule ^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$3&page=$4

    RewriteRule ^(.*)/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/index.php?moduleid=$2&catid=$3&itemid=$4&page=$5

    RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3

    RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ $1/index.php?homepage=$2&file=$3&rewrite=$4

    RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)([/])?$ $1/index.php?homepage=$2&file=$3

    RewriteRule ^(.*)/com/([a-z0-9_\-]+)([/])?$ $1/index.php?homepage=$2

    DocumentRoot D:/www/www.destoon.com/company/

    ServerName destoon.com

    ServerAlias *.destoon.com

    RewriteEngine On

    ErrorDocument 404 /404.php

    RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php

    RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3


nginx.txt

server

{

listen       80;

server_name *.destoon.com;

index index.html index.php;

root  /var/www/www.destoon.com/company; 

error_page 404 = /404.php;

location / {

    rewrite ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3 last;

}

location ~ .*\.(php|php5)?$

{

fastcgi_pass  unix:/tmp/php-cgi.sock;

fastcgi_index index.php;

include fcgi.conf;

}

}


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回