分享

写回答

发帖

[提问] 狗爹爹的windows空间支不支持.htaccess?怎么转换成web.config?

回答|共 18 个

SmartX

发表于 2010-5-26 12:33:18 | 显示全部楼层

嘿 自己检查下吧 我不知道你是什么程序 不好说啊

abcd10

发表于 2010-5-26 12:38:09 | 显示全部楼层

好的。谢谢
不知道是不是论坛不支持某些代码。你可以发附件吗?能不能把转换好的代码当附件发出来?

chanet

发表于 2010-5-26 12:53:46 | 显示全部楼层

我有那个confi文件,可以发给你。

abcd10

发表于 2010-5-26 13:05:25 | 显示全部楼层

你的程序跟我是一样的吗?不一样的程序不能通用这个web.config文件吧?

chenxi

发表于 2010-5-26 13:08:40 | 显示全部楼层

discuz X的伪静态能麻烦生成一个web.config吗 ?谢谢

add.c

发表于 2010-5-26 13:19:38 | 显示全部楼层

原帖由 chenxi 于 2010-5-26 13:08 发表
discuz X的伪静态能麻烦生成一个web.config吗 ?谢谢

已有人发
http://bbs.idcspy.com/thread-97654-1-1.html

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="topic">
                    <match url="^topic-(.+)\.html$" />
                    <action type="Rewrite" url="portal.php?mod=topic&amp;topic={R:1}" />
                </rule>
                <rule name="fuchuan">
                    <match url="article-([0-9]+)\.html$" />
                    <action type="Rewrite" url="portal.php?mod=view&amp;aid={R:1}" />
                </rule>
                <rule name="forum">
                    <match url="^forum-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="forum.php?mod=forumdisplay&amp;fid={R:1}&amp;page={R:2}" appendQueryString="false" />
                </rule>
                <rule name="thread">
                    <match url="^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" />
                    <action type="Rewrite" url="forum.php?mod=viewthread&amp;tid={R:1}&amp;extra=page\%3D{R:2}&amp;page={R:3}" />
                </rule>
                <rule name="group">
                    <match url="^group-([0-9]+)-([0-9]+)\.html$" />
                    <action type="Rewrite" url="forum.php?mod=group&amp;fid={R:1}&amp;page={R:2}" />
                </rule>
                <rule name="space">
                    <match url="^space-(username|uid)-(.+)\.html$" />
                    <action type="Rewrite" url="home.php?mod=space&amp;{R:1}={R:2}" />
                </rule>
                <rule name="Xrewrite">
                    <match url="^([a-z]+)-(.+)\.html$" />
                    <action type="Rewrite" url="{R:1}.php?rewrite={R:2}" />
                </rule>
            </rules>
        </rewrite>
  <httpErrors errorMode="Detailed" />
  <asp scriptErrorSentToBrowser="true" />
  </system.webServer>
<system.web>
<customErrors mode="Off" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" />
</system.web>
</configuration>

chenxi

发表于 2010-5-26 13:51:14 | 显示全部楼层

谢谢,用http://bbs.idcspy.com/thread-97654-1-1.html这个里面二楼的办法解决了

763639

发表于 2011-6-1 17:17:17 | 显示全部楼层

RewriteEngine On
RewriteBase /


# duoduo Rewrite规则
RewriteRule index\.html$ /index\.php
RewriteRule sitemap\.html$ /sitemap\.php
RewriteRule malllist\.html$ /malllist\.php
RewriteRule shoplist\.html$ /shoplist\.php
RewriteRule article\.html$ /article\.php
RewriteRule user/center\.html$ /user/center\.php
RewriteRule mall-(.*)\.html$ /mall\.php\?id=$1
RewriteRule view-(.*)-(.*)\.html$ /view\.php\?iid=$1&page=$2
RewriteRule view-(.*)\.html$ /view\.php\?iid=$1
RewriteRule malllist-(.*)-(.*)-(.*)\.html$ /malllist\.php\?catid=$1&mall=$2&page=$3
RewriteRule article_list-(.*)-(.*)\.html$ /article_list\.php\?cid=$1&page=$2
RewriteRule article_list-(.*)\.html$ /article_list\.php\?cid=$1
RewriteRule read-(.*)\.html$ /read\.php\?id=$1
RewriteRule list-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /list\.php\?cid=$1&start_price=$2&end_price=$3&sort=$4&area=$5&guarantee=$6&list=$7&q=$8&page=$9
RewriteRule shop-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /shop\.php\?nick=$1&start_price=$2&end_price=$3&sort=$4&area=$5&guarantee=$6&list=$7&q=$8&page=$9
RewriteRule shoplist-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /shoplist\.php\?cid=$1&keyword=$2&startlevel=$3&endlevel=$4&area=$5&px=$6&page=$7
RewriteRule shoplist-(.*)\.html$ /shoplist\.php\?cid=$1
RewriteRule shop-(.*)\.html$ /shop\.php\?nick=$1
RewriteRule list-(.*)\.html$ /list\.php\?cid=$1
RewriteRule list\.html$ /list\.php




能帮我转下吗
回复 支持 反对

使用道具 举报

lwbo1987

发表于 2011-6-1 17:38:53 | 显示全部楼层

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则