IIS下的httpd.ini伪静态规则用htaccess规则该如何转换?
贴出htaccess的规则,求助一下大家该如何转成httpd.ini规则。我自己转的不能用。---------------------------------------...
贴出htaccess的规则,求助一下大家该如何转成httpd.ini规则。我自己转的不能用。
--------------------------------------------------------------
RewriteEngine on
#防止盗链
#RewriteCond %{HTTP_REFERER} !^http://www.baidu.com/.*$ [NC]
#RewriteCond %{HTTP_REFERER} !^http://baidu.com/.*$ [NC]
#RewriteRule .*\.(gif|jpg|psd|bmp|swf|midi|wav|mp3|wma|avi|mpg|wmv|asf|rm|rmvb|zip|rar|flv)$ http://www.baidu.com/logo.png [L]
#使用Url rewirte功能
RewriteBase /
# Rewrite 系统规则请勿修改
RewriteCond $1 !^(images|js|templates|upfiles|robots\.txt|index\.php|fckeditor\.html)
# 首页正则,一般用不到
RewriteRule ^index\.html$ index.php [L]
# 列表页正则
RewriteRule ^cid-([0-9]+)\.html$ index.php?c=list&cid=$1 [L]
RewriteRule ^cid-([0-9]+)-([0-9]+)\.html$ index.php?c=list&cid=$1&pageid=$2 [L]
RewriteRule ^cs-([a-z0-9A-Z]+)\.html$ index.php?c=list&cs=$1 [L]
RewriteRule ^cs-([a-z0-9A-Z]+)-([0-9]+)\.html$ index.php?c=list&cs=$1&pageid=$2 [L]
RewriteRule ^mid-([0-9]+)\.html$ index.php?c=list&mid=$1 [L]
RewriteRule ^mid-([0-9]+)-([0-9]+)\.html$ index.php?c=list&mid=$1&pageid=$2 [L]
RewriteRule ^ms-([a-z0-9A-Z]+)\.html$ index.php?c=list&ms=$1 [L]
RewriteRule ^ms-([a-z0-9A-Z]+)-([0-9]+)\.html$ index.php?c=list&ms=$1&pageid=$2 [L]
# 内容页正则
RewriteRule ^c([0-9]+)\.html$ index.php?c=msg&id=$1 [L]
RewriteRule ^([a-z0-9A-Z\_\-]+)\.html$ index.php?c=msg&ts=$1 [L]
转为httpd.ini的代码该怎么写呢? 展开
--------------------------------------------------------------
RewriteEngine on
#防止盗链
#RewriteCond %{HTTP_REFERER} !^http://www.baidu.com/.*$ [NC]
#RewriteCond %{HTTP_REFERER} !^http://baidu.com/.*$ [NC]
#RewriteRule .*\.(gif|jpg|psd|bmp|swf|midi|wav|mp3|wma|avi|mpg|wmv|asf|rm|rmvb|zip|rar|flv)$ http://www.baidu.com/logo.png [L]
#使用Url rewirte功能
RewriteBase /
# Rewrite 系统规则请勿修改
RewriteCond $1 !^(images|js|templates|upfiles|robots\.txt|index\.php|fckeditor\.html)
# 首页正则,一般用不到
RewriteRule ^index\.html$ index.php [L]
# 列表页正则
RewriteRule ^cid-([0-9]+)\.html$ index.php?c=list&cid=$1 [L]
RewriteRule ^cid-([0-9]+)-([0-9]+)\.html$ index.php?c=list&cid=$1&pageid=$2 [L]
RewriteRule ^cs-([a-z0-9A-Z]+)\.html$ index.php?c=list&cs=$1 [L]
RewriteRule ^cs-([a-z0-9A-Z]+)-([0-9]+)\.html$ index.php?c=list&cs=$1&pageid=$2 [L]
RewriteRule ^mid-([0-9]+)\.html$ index.php?c=list&mid=$1 [L]
RewriteRule ^mid-([0-9]+)-([0-9]+)\.html$ index.php?c=list&mid=$1&pageid=$2 [L]
RewriteRule ^ms-([a-z0-9A-Z]+)\.html$ index.php?c=list&ms=$1 [L]
RewriteRule ^ms-([a-z0-9A-Z]+)-([0-9]+)\.html$ index.php?c=list&ms=$1&pageid=$2 [L]
# 内容页正则
RewriteRule ^c([0-9]+)\.html$ index.php?c=msg&id=$1 [L]
RewriteRule ^([a-z0-9A-Z\_\-]+)\.html$ index.php?c=msg&ts=$1 [L]
转为httpd.ini的代码该怎么写呢? 展开
2个回答
展开全部
试试把$改成?
如下:
RewriteRule ^/show,([0-9]*),([0-9,a-z,A-Z]*).htm /show.asp\?supplierID=$1&supplier=$2 [L]
如下:
RewriteRule ^/show,([0-9]*),([0-9,a-z,A-Z]*).htm /show.asp\?supplierID=$1&supplier=$2 [L]
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
Storm代理
2023-07-25 广告
2023-07-25 广告
StormProxies是一家提供动态代理服务器服务的企业,旨在帮助用户更好地管理网络访问和安全。以下是一些关于StormProxies的IP动态代理服务的特点:1. 高匿名性:StormProxies的动态代理服务器具有高匿名性,可以有效...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询