分享

写回答

发帖

[提问] 求助windows伪静态问题

dstwhk

发表于 2012-1-31 15:35:52 | 显示全部楼层

以前用win的设置过各种伪静态,全部失败
建议切换到linux
回复 支持 反对

使用道具 举报

GoDaddy GoDaddy 3588 人阅读 | 10 人回复

回答|共 10 个

发表于 2012-1-31 09:05:48 | 显示全部楼层 |阅读模式

小弟本来是linux主机,这几天抽风一直上不了,无奈切换了版本,IP也变了。现在访问一切OK中。SSL的独立IP也变了,心情很愉悦!老IP也能用,新的也能用,现在就是一个问题怎么我把windows的伪静态httpd.ini放进空间却不能用呢?哪个大哥给说下是什么原因?下面是规则
[ISAPI_Rewrite]
# Rewrite 2.x
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32

RewriteRule ^(.*)/video/search/(.*)$ $1/index.php\?s=video/search/$2
RewriteRule ^(.*)/list/(.*)$ $1/index.php\?s=video/lists/id/$2
RewriteRule ^(.*)/movie/(.*)$ $1/index.php\?s=video/detail/id/$2
RewriteRule ^(.*)/player/(.*)$ $1/index.php\?s=video/play/id/$2
RewriteRule ^(.*)/info/search/(.*)$ $1/index.php\?s=info/search/$2
RewriteRule ^(.*)/newslist/(.*)$ $1/index.php\?s=info/lists/id/$2
RewriteRule ^(.*)/news/(.*)$ $1/index.php\?s=info/detail/id/$2
RewriteRule ^(.*)/special/(.*)$ $1/index.php\?s=special/$2
RewriteRule ^(.*)/guestbook/(.*)$ $1/index.php\?s=guestbook/$2
RewriteRule ^(.*)/top10/(.*)$ $1/index.php\?s=top10/$2
RewriteRule ^(.*)/my/(.*)$ $1/index.php\?s=my/$2
RewriteRule ^(.*)/map/lists/(.*)$ $1/index.php\?s=map/lists/$2
RewriteRule ^(.*)/template/(.*)/home/(.*).html$ $1/index.php [I]

lwbo1987

发表于 2012-1-31 09:27:15 | 显示全部楼层

你的什么程序?windows一般是在web.config里面写
回复 支持 反对

使用道具 举报

free512

发表于 2012-1-31 09:30:33 | 显示全部楼层

这个问题真不懂,楼上的真是见多识广啊
回复 支持 反对

使用道具 举报

1302121

发表于 2012-1-31 09:33:14 | 显示全部楼层

我是用的gxcms电影系统
回复 支持 反对

使用道具 举报

1302121

发表于 2012-1-31 09:35:51 | 显示全部楼层

我用了他给出的规则后就出现500错误
iis7用户请直接导航.htaccess或者将以下规则添加到web.config

<rewrite>

<rules>

  <rule name="已导入的规则 1">

   <match url="^video/search/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=video/search/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 2">

   <match url="^info/search/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=info/search/{R:1}" appendQueryString="false" />

  </rule>  

  <rule name="已导入的规则 3">

   <match url="^list/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=video/lists/id/{R:1}" appendQueryString="false" />

  </rule>   

  <rule name="已导入的规则 4">

   <match url="^movie/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=video/detail/id/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 5">

   <match url="^player/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=video/play/id/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 6">

   <match url="^newslist/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=info/lists/id/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 7">

   <match url="^news/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=info/detail/id/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 8">

   <match url="^special/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=special/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 9">

   <match url="^guestbook/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=guestbook/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 10">

   <match url="^top10/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=top10/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 11">

   <match url="^my/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=my/{R:1}" appendQueryString="false" />

  </rule>

  <rule name="已导入的规则 12">

   <match url="^map/lists/(.*)$" ignoreCase="false" />

   <action type="Rewrite" url="index.php\?s=map/lists/{R:1}" appendQueryString="false" />

  </rule>  

</rules>

</rewrite>
回复 支持 反对

使用道具 举报

暮木娃娃

发表于 2012-1-31 09:36:34 | 显示全部楼层

1302121 发表于 2012-1-31 09:33 AM
我是用的gxcms电影系统

用web.config吧。具体代码网上应该能搜到吧
回复 支持 反对

使用道具 举报

lwbo1987

发表于 2012-1-31 09:36:36 | 显示全部楼层

500错误,说明写的伪静态代码有错误
回复 支持 反对

使用道具 举报

1302121

发表于 2012-1-31 09:42:17 | 显示全部楼层

哎,不会写啊!
回复 支持 反对

使用道具 举报

1302121

发表于 2012-1-31 09:42:49 | 显示全部楼层

版主能给按我那个规则给写一条吗?其他的我自己弄
回复 支持 反对

使用道具 举报

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

本版积分规则