永发信息网

如何把htaccess转化为httpd.ini

答案:1  悬赏:50  手机版
解决时间 2021-04-24 11:34
  • 提问者网友:愿为果
  • 2021-04-24 02:24

开了一个虚拟主机,不支持htaccess,只支持httpd.ini,现在有htaccess代码:

 

RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show.php?itemid=$2&page=$4
RewriteRule ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list.php?catid=$2&page=$4
RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3
RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3
RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3
RewriteRule ^(com)/([a-z0-9]+)/([a-z]+)/(.*)\.html$ index.php?homepage=$2&rewrite=$4
RewriteRule ^(com)/([a-z0-9]+)/([a-z]+)([/])?$ index.php?homepage=$2&file=$3
RewriteRule ^(com)/([a-z0-9]+)([/])?$ index.php?homepage=$2
# Apache .conf Rules (Replace line 12 & line 13 & line 14)
#RewriteRule ^(.*)/com/([a-z0-9]+)/([a-z]+)/(.*)\.html$ $1/gongsi/$3/index.php?homepage=$2&rewrite=$4
#RewriteRule ^(.*)/com/([a-z0-9]+)/([a-z]+)([/])?$ $1/gongsi/$3/index.php?homepage=$2
#RewriteRule ^(.*)/com/([a-z0-9]+)([/])?$ $1/gongsi/index.php?homepage=$2

 

想找高人帮忙转化为httpd.ini代码一下,谢谢了。

最佳答案
  • 五星知识达人网友:鸠书
  • 2021-04-24 02:56
试试把它直接放在httpd.ini里边试试,然后再把里边的所有问号变成  \?
我没尝试过,不一定有效
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯