IIS下的伪静态规则怎么写

IIS下的伪静态规则怎么写,第1张

IIS服务器下ISAPI_Rewrite伪静态规则

[ISAPI_Rewrite]

# 3600 = 1 hour

CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files

# from accessing through HTTP

#heads

RewriteRule ^(.*)/Contact\.html\?*(.*)$ $1/index.\php\?pag=contact

RewriteRule ^(.*)/Manual-Submit-Software\.html\?*(.*)$ $1/index.\php\?a=pad&manual_submit

#others

RewriteRule ^(.*)/New\.html\?*(.*)$ $1/index.\php\?pag=new_prog&days=30

RewriteRule ^(.*)/New/Page(.*)\.html\?*(.*)$ $1/index.\php\?pag=new_prog&days=30&page=$2

RewriteRule ^(.*)/Today-New\.html\?*(.*)$ $1/index.\php\?pag=new_prog&days=1

RewriteRule ^(.*)/Today-New/Page(.*)\.html\?*(.*)$ $1/index.\php\?pag=new_prog&days=1&page=$2

RewriteRule ^(.*)/New-Hot\.html\?*(.*)$ $1/index.\php\?pag=new_prog&days=7&hits=10

RewriteRule ^(.*)/New-Hot/Page(.*)\.html$ /index.\php\?pag=new_prog&days=7&hits=10&page=$2

RewriteRule ^(.*)/Downloads\.html\?*(.*)$ $1/index.\php\?pag=downloads

RewriteRule ^(.*)/Downloads/Page(.*)\.html\?*(.*)$ $1/index.\php\?pag=downloads&page=$2

#reviews

RewriteRule ^(.*)/ReadReview-(.*)\.html\?*(.*)$ $1/index.\php\?pag=read_review&id=$2&c

RewriteRule ^(.*)/AllReviews-(.*)\.html\?*(.*)$ $1/index.\php\?pag=all_reviews&id=$2&c

RewriteRule ^(.*)/Reviews-(.*)\.html\?*(.*)$ $1/index.\php\?pag=user_reviews&username=$2&c

#user 1

RewriteRule ^(.*)/Delete-Review-(.*)\.html\?*(.*)$ $1/index.\php\?a=user&b=reviews&delete=$2

RewriteRule ^(.*)/Edit-Review-(.*)\.html\?*(.*)$ $1/index.\php\?a=user&b=reviews&edit=$2

#report page

RewriteRule ^(.*)/Report/file-(.*)\.html\?*(.*)$ $1/index.\php\?pag=report&b=$2

#send friend

RewriteRule ^(.*)/Send-Friend/file-(.*)\.html\?*(.*)$ $1/index.\php\?pag=send_friend&b=$2

#users links

RewriteRule ^(.*)/User-Panel\.html\?*(.*)$ $1/index.\php\?a=user

RewriteRule ^(.*)/My-Settings\.html\?*(.*)$ $1/index.\php\?a=user&b=profil

RewriteRule ^(.*)/My-Alerts\.html\?*(.*)$ $1/index.\php\?a=user&b=alerts

RewriteRule ^(.*)/My-Reviews\.html\?*(.*)$ $1/index.\php\?a=user&b=reviews

RewriteRule ^(.*)/Change-Pass\.html\?*(.*)$ $1/index.\php\?a=user&b=profil&pass

RewriteRule ^(.*)/Log-Out\.html\?*(.*)$ $1/index.\php\?a=user&b=logout

RewriteRule ^(.*)/Register-Form\.html\?*(.*)$ $1/index.\php\?pag=register

RewriteRule ^(.*)/Lost-Password-Form\.html\?*(.*)$ $1/index.\php\?pag=password

RewriteRule ^(.*)/Resend-Confirmation-Email\.html\?*(.*)$ $1/index.\php\?pag=resend_email

#categorii

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)\.html\?*(.*)$ $1/index.\php\?os=$2&cat=$3

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)/([a-zA-Z0-9\-]+)\.html\?*(.*)$ $1/index.\php\?os=$2&cat=$3&subcat=$4

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)/([a-zA-Z0-9\-]+)/Page(.*)\.html\?*(.*)$ $1/index.\php\?os=$2&cat=$3&subcat=$4&page=$5

#program download

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)/([a-zA-Z0-9\-]+)/file_(.*)_1\.html\?*(.*)$ $1/index.\php\?a=prog&os=$2&cat=$3&subcat=$4&det=$5&dwn

#program buy

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)/([a-zA-Z0-9\-]+)/file_(.*)_2\.html\?*(.*)$ $1/index.\php\?a=prog&os=$2&cat=$3&subcat=$4&det=$5&buy

#program images

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)/([a-zA-Z0-9\-]+)/file_(.*)_4\.html\?*(.*)$ $1/index.\php\?a=prog&os=$2&cat=$3&subcat=$4&det=$5&img

#program autor

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)/([a-zA-Z0-9\-]+)/file_(.*)_5\.html\?*(.*)$ $1/index.\php\?a=prog&os=$2&cat=$3&subcat=$4&det=$5&pub

#program reviews

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)/([a-zA-Z0-9\-]+)/file_(.*)_3\.html\?*(.*)$ $1/index.\php\?a=prog&os=$2&cat=$3&subcat=$4&det=$5&rev

#program general

RewriteRule ^(.*)/([a-zA-Z\-]+)/([a-zA-Z\-]+)/([a-zA-Z0-9\-]+)/file_(.*)\.html\?*(.*)$ $1/index\.php\?a=prog&os=$2&cat=$3&subcat=$4&det=$5

RewriteRule ^(.*)/([a-zA-Z\-]+)\.html\?*(.*)$ $1/index\.php\?os=$2

以上为apache的伪静态规则。 rewrite ^/([a-z]+)/p_([0-9]+)\.html$ /list.php?id=$1 last转换后 ...这个会的人很少?看专业的网站试试...


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11876708.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-19
下一篇 2023-05-19

发表评论

登录后才能评论

评论列表(0条)

保存