分享

写回答

发帖

[介绍] win空间实现php伪静态的方法

GoDaddy GoDaddy 5145 人阅读 | 9 人回复

发表于 2010-7-21 17:21:53 | 显示全部楼层 |阅读模式

win空间还是很全能的
不要去管那些htaccess.txt  .htaccess 忽视他们吧,这是官方的原话

我们需要的是web.config
本方法适用于你的网站在根目录下的一个文件夹,joomla程序。不要管它是什么文件夹,把web.config上传到那个文件夹即可。当然,然后还要在后台打开重写

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="Common Exploit Blocking" stopProcessing="true">
                    <match url="^(.*)$" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" />
                        <add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" />
                        <add input="{QUERY_STRING}" pattern="(\&lt;|%3C).*script.*(\>|%3E)" />
                        <add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" />
                        <add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" />
                    </conditions>
                    <action type="Redirect" url="index.php" appendQueryString="false" redirectType="SeeOther" />
                </rule>
                <rule name="Joomla Search Rule" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{URL}" pattern="^/search.php" ignoreCase="true" />
                    </conditions>
                    <action type="Rewrite" url="/index.php?option=com_content&view=article&id=4" />
                </rule>
                <rule name="Joomla Main Rewrite Rule" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />
                    </conditions>
                    <action type="Rewrite" url="index.php/" />
                </rule>
            </rules>
        </rewrite>
        <caching>
            <profiles>
                <add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
            </profiles>
        </caching>
    </system.webServer>
</configuration>

[ 本帖最后由 tpxp 于 2010-7-21 05:37 PM 编辑 ]

评分

参与人数 1威望 +5 金币 +6 银币 +6 收起 理由
add.c + 5 + 6 + 6 助人为乐

查看全部评分

回答|共 9 个

hgh188

发表于 2010-7-21 17:24:41 | 显示全部楼层

收藏备用,dz的我都已经伪静态,http://dzh7.com/
RAKSmart

tpxp

发表于 2010-7-21 17:27:32 | 显示全部楼层

回复 2# 的帖子

开心私塾

发表于 2010-7-21 17:31:26 | 显示全部楼层

收藏好贴啊。

卡佰利

发表于 2010-7-21 19:39:56 | 显示全部楼层

收藏了,到时肯定有用

dfydxf

发表于 2010-7-21 19:42:07 | 显示全部楼层

很不错,标记学习

hgh188

发表于 2010-7-21 19:50:11 | 显示全部楼层

回复 5# 的帖子

我真正是上线站是http://www.phguchi.com/

那个只是用来养域名,什么附件都没摆,只摆了个空壳在

add.c

发表于 2010-7-22 10:54:12 | 显示全部楼层

  已收录到http://bbs.idcspy.com/thread-71669-1-1.html

smartli

发表于 2010-7-22 11:13:35 | 显示全部楼层

我就不理解,,为什么我把这个放到网站目录下,那个网站就打不开了..每次都提示:505错误..前辈请教啊,

add.c

发表于 2010-7-22 11:20:24 | 显示全部楼层

回复 11# 的帖子

这个是针对joomla程序的, 你什么程序
您需要登录后才可以回帖 登录 | 注册

本版积分规则