关于伪静态和泛解析的问题,帮忙
我的是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> 军哥出来帮忙看看啊
另外今天早晨论坛访问速度很慢,不知道是怎么回事
页:
[1]