.htaccess的二级目录伪静态规则怎么写(附.htaccess内容):
RewriteEngineonrewritebase/rewriterule^index.html$/index.php?m=indexrewriterule^my/(....
RewriteEngine on
rewritebase /
rewriterule ^index.html$ /index.php?m=index
rewriterule ^my/(.*)\.html$ /index.php?m=about&d=$1
rewriterule ^0/$ /index.php?m=list
rewriterule ^0/index\.html$ /index.php?m=list
rewriterule ^(\d+)/$ /index.php?m=list&typeid=$1
rewriterule ^(\d+)/index\.html$ /index.php?m=list&typeid=$1
rewriterule ^(\d+)/f\.html$ /index.php?m=list&typeid=$1&s=f
rewriterule ^(\d+)/n\.html$ /index.php?m=list&typeid=$1&s=n
rewriterule ^(\d+)/p(\d+)\.html$ /index.php?m=list&typeid=$1&p=$2
rewriterule ^(\d+)/f-(\d+)\.html$ /index.php?m=list&typeid=$1&p=$2&s=f
rewriterule ^(\d+)/n-(\d+)\.html$ /index.php?m=list&typeid=$1&p=$2&s=n
rewriterule ^(\d+)/top\.html$ /index.php?m=top&typeid=$1
rewriterule ^t/$ /index.php?m=zhuanti
rewriterule ^t/index.html$ /index.php?m=zhuanti
rewriterule ^(\w+)/$ /index.php?m=topic&topicpin=$1
rewriterule ^(\w+)/index\.html$ /index.php?m=topic&topicpin=$1
rewriterule ^(\w+)/f\.html$ /index.php?m=topic&topicpin=$1&s=f
rewriterule ^(\w+)/n\.html$ /index.php?m=topic&topicpin=$1&s=n
rewriterule ^(\w+)/p(\d+)\.html$ /index.php?m=topic&topicpin=$1&p=$2
rewriterule ^(\w+)/f-(\d+)\.html$ /index.php?m=topic&topicpin=$1&p=$2&s=f
rewriterule ^(\w+)/n-(\d+)\.html$ /index.php?m=topic&topicpin=$1&p=$2&s=n
rewriterule ^g/(\d+)\.html$ /index.php?m=show&gameid=$1
rewriterule ^g/(\d+)-play\.html$ /index.php?m=play&gameid=$1
rewriterule ^g/(\d+)-screen\.html$ /index.php?m=play-screen&gameid=$1
想支持二级目录了,不知道怎么修改!!清高手赐教!谢谢!!
本规则是在跟目录下的,想修改成二级目录 /youxi/ 就可以了!谢谢! 展开
rewritebase /
rewriterule ^index.html$ /index.php?m=index
rewriterule ^my/(.*)\.html$ /index.php?m=about&d=$1
rewriterule ^0/$ /index.php?m=list
rewriterule ^0/index\.html$ /index.php?m=list
rewriterule ^(\d+)/$ /index.php?m=list&typeid=$1
rewriterule ^(\d+)/index\.html$ /index.php?m=list&typeid=$1
rewriterule ^(\d+)/f\.html$ /index.php?m=list&typeid=$1&s=f
rewriterule ^(\d+)/n\.html$ /index.php?m=list&typeid=$1&s=n
rewriterule ^(\d+)/p(\d+)\.html$ /index.php?m=list&typeid=$1&p=$2
rewriterule ^(\d+)/f-(\d+)\.html$ /index.php?m=list&typeid=$1&p=$2&s=f
rewriterule ^(\d+)/n-(\d+)\.html$ /index.php?m=list&typeid=$1&p=$2&s=n
rewriterule ^(\d+)/top\.html$ /index.php?m=top&typeid=$1
rewriterule ^t/$ /index.php?m=zhuanti
rewriterule ^t/index.html$ /index.php?m=zhuanti
rewriterule ^(\w+)/$ /index.php?m=topic&topicpin=$1
rewriterule ^(\w+)/index\.html$ /index.php?m=topic&topicpin=$1
rewriterule ^(\w+)/f\.html$ /index.php?m=topic&topicpin=$1&s=f
rewriterule ^(\w+)/n\.html$ /index.php?m=topic&topicpin=$1&s=n
rewriterule ^(\w+)/p(\d+)\.html$ /index.php?m=topic&topicpin=$1&p=$2
rewriterule ^(\w+)/f-(\d+)\.html$ /index.php?m=topic&topicpin=$1&p=$2&s=f
rewriterule ^(\w+)/n-(\d+)\.html$ /index.php?m=topic&topicpin=$1&p=$2&s=n
rewriterule ^g/(\d+)\.html$ /index.php?m=show&gameid=$1
rewriterule ^g/(\d+)-play\.html$ /index.php?m=play&gameid=$1
rewriterule ^g/(\d+)-screen\.html$ /index.php?m=play-screen&gameid=$1
想支持二级目录了,不知道怎么修改!!清高手赐教!谢谢!!
本规则是在跟目录下的,想修改成二级目录 /youxi/ 就可以了!谢谢! 展开
3个回答
展开全部
修改
rewritebase /
为
rewritebase /youxi/
即可
rewritebase /
为
rewritebase /youxi/
即可
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
云创
2023-07-25 广告
2023-07-25 广告
代码静态分析服务的费用因服务提供商、服务类型、服务范围、服务时长等因素而异,因此没有一个固定的费用标准。以下是一些可能影响费用的因素:1. 服务提供商:不同的服务提供商可能会有不同的收费标准和服务质量。2. 服务类型:不同的代码静态分析服务...
点击进入详情页
本回答由云创提供
展开全部
修改
rewritebase /
为
rewritebase /youxi/
即可
rewritebase /
为
rewritebase /youxi/
即可
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询