军哥帮忙,伪静态和泛解析的问题,搞了很长时间实在没办法了,帮忙
我的是centos5.6,装的是LNMP一键安装包,目前服务器上有两个站点,一个需要做伪静态和泛解析
主要是我之前是APACHE,规则不知道怎么转换,另外需要用到跳转代码go.php,不知道如何设置
刚接触CENTOS,希望帮忙看看,谢谢
<VirtualHost *:80>
ServerNamewww.shzhutong.com
ServerAlias www.shzhutong.com
DocumentRoot /var/www/html/www6
ErrorLog "logs/1xiu-error.log"
CustomLog "logs/1xiu-access.log" common
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/(zsj|sqk|company)/(+)-(+)-(+)-(+)-(+)-(+)-(.*)/$ $1/$2/index.php?orderid=$3&a2=$4&a3=$5&a4=$6&a5=$7&a6=$8&a7=$9
#RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
#RewriteRule ^(.*)/forum-(+)-(+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
#RewriteRule ^(.*)/thread-(+)-(+)-(+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
#RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
#RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
RewriteRule ^(.*)/bbs/images/(.*) $1/bbs/images/$2
RewriteRule ^(.*)/bbs/(.*) http://bbs.shzhutong.com/$2
RewriteRule ^(.*)/(+)/(+)(+)/$ $1/$2/$3.php?uid=$4
RewriteRule ^(.*)/(sjs|yz|zs|sj)/(+)/?$ $1/$2/index.php?uid=$3
RewriteRule ^(.*)/(+)/(+)/(*)(+)(?)-(+)-(+).html$ $1/$2/$5.php?uid=$3&act=$7&gate=$4&exe=$6&page=$8
RewriteRule ^(.*)/(+)/(+)/(+)-display-(+)(+).html$ $1/$2/$4.php?uid=$3&act=display&$5id=$6
RewriteRule ^(.*)/(+)/(+)-(+)(s(+))?(i(+))?p?(+)?$ $1/$2/$3.php?btype=$4&stype=$6&id=$8&page=$9
#RewriteRule ^(.*)/(case)/(c)((?)(?)(?)*).html$ $1/cache/$3/$5/$6/$7/$4.htm
#RewriteRule ^(.*)/(+)/(a|m)((?)(?)(?)*).html$ $1/cache/$3/$5/$6/$7/$4.htm
RewriteRule ^(.*)/(+)/(+)(+)-?(+)?.html$ $1/$2/$3.php?id=$4&page=$5
RewriteRule ^(.*)/(+)/(+)(+)h.html$ $1/html/$2/$3$4h.html
RewriteRule ^(.*)/(+)/(+)-h(+)(s(+))?(i(+))?$ $1/html/$2/$3-h$4$5$7.html
RewriteRule ^(.*)/zt(+)/$$1/zt/topic.php?zid=$2
RewriteRule ^(.*)/zt(+)/(+)(+).html$ $1/zt/$3.php?zid=$2&type=$4
</IfModule>
< /VirtualHost>
< VirtualHost *:80>
ServerName*.shzhutong.com
ServerAlias *.shzhutong.com
DocumentRoot /var/www/html/www6
ErrorLog "logs/f1xiu-error.log"
CustomLog "logs/f1xiu-access.log" common
<LocationMatch ^/go.php>
Order allow,deny
allow from all
</LocationMatch>
DirectoryIndex go.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteRule ^(+)\.shzhutng\.com/company/(.*)$]http://)?(www\.)?(+)\.shzhutng\.com/company/(.*)$ http://www.shzhutong.com/company/index.php?city=$3
#RewriteRule ^(.*)$ /go.php
RewriteRule ^(.*)/(+)/(+)(+)-?(+)?.html$ $1/$2/$3.php?id=$4&page=$5
RewriteRule ^(.*)/zb/$ $1/zb/index.php
RewriteRule ^(.*)/(zsj|sqk|company)/(+)-(+)-(+)-(+)-(+)-(+)-(.*)/$ $1/$2/index.php?orderid=$3&a2=$4&a3=$5&a4=$6&a5=$7&a6=$8&a7=$9
RewriteRule ^(.*)/sqk/$ $1/sqk/index.php
RewriteRule ^(.*)/company/$ $1/company/index.php
#RewriteRule ^(.*)$ /go.php
RewriteRule ^(.*)/(+)/(+)(+)/$ $1/$2/$3.php?uid=$4
RewriteRule ^(.*)/(sjs|yz|zs|sj)/(+)/?$ $1/$2/index.php?uid=$3
RewriteRule ^(.*)/(+)/(+)/(*)(+)(?)-(+)-(+).html$ $1/$2/$5.php?uid=$3&act=$7&gate=$4&exe=$6&page=$8
RewriteRule ^(.*)/(+)/(+)/(+)-display-(+)(+).html$ $1/$2/$4.php?uid=$3&act=display&$5id=$6
RewriteRule ^(.*)/(+)/(+)-(+)(s(+))?(i(+))?p?(+)?$ $1/$2/$3.php?btype=$4&stype=$6&id=$8&page=$9
</IfModule>
< /VirtualHost> 伪静态不了解,请不要重复发帖。
泛解析 一样是*.vpser.net 不能用vhost.sh添加。可以先用其他域名添加再修改配置。 原帖由 licess 于 2011-10-13 16:57 发表 https://bbs.vpser.net/images/common/back.gif
伪静态不了解,请不要重复发帖。
泛解析 一样是*.vpser.net 不能用vhost.sh添加。可以先用其他域名添加再修改配置。
我现在是一个网站上除了www可以访问主站之外,另外再新建一个人点,然后配置泛解析是吗?同时指向同一个目录。可以吗 可以,得修改配置
页:
[1]