厦门服务器租用>>虚拟主机如何设置伪静态规则

虚拟主机如何设置伪静态规则

发布时间:2013/5/8 0:04:30    来源: 纵横数据

问:纵横数据得虚拟主机如何设置伪静态规则

答:虚拟主机用户只需要上传httpd.ini到web 下自己配置规则就可以使用了。以下是httpd.ini的书写例子:

[ISAPI_Rewrite]

RewriteRule ^(.*)/([0-9]+)-(.*)\.html$ $1/product\.php\?id_product=$2 [I]

RewriteRule ^(.*)/([0-9]+)-([a-zA-Z0-9]*)$ $1/category\.php\?id_category=$2 [I]
RewriteRule ^(.*)/([0-9]+)-([a-zA-Z0-9]*)?p=([0-9]+)$ $1/category\.php\?id_category=$1\&p=$2 [I]

RewriteRule ^(.*)/([0-9]+)__([a-zA-Z0-9]*)$ $1/supplier\.php\?id_supplier=$2 [I]
RewriteRule ^(.*)/([0-9]+)_([a-zA-Z0-9]*)$ $1/manufacturer\.php\?id_manufacturer=$2 [I]


RewriteRule ^(.*)/items/([0-9]+).html$ $1/w/index\.php\?p=$1 [I]
RewriteRule ^(.*)/categories (.*)$ $1/w/index\.php\?category_name=$1 [I]

ErrorDocument 404 /404.html

如果您使用的网上下载的开源程序,您可以通过该程序的官网或者百度找到规则内容,如果您的程序是从个人开发者手中购买的,如果程序支持伪静态,也可以要求开发者给您提供规则内容。

上一篇:没有了
下一篇:没有了
在线客服
微信公众号
免费拨打400-1886560
免费拨打0592-5580190 免费拨打 400-1886560 或 0592-5580190
返回顶部
返回头部 返回顶部