Loving Coding & Visual Design

URL Rewrite的VBscript解决办法

比如要实现这样的URL转向:
http://www.zhaiduo.com/page/3/
=>
http://zhaiduo.googlepages.com/search3.htm

如果服务器没有URLRewrite功能可用这个代码在Windows下生成目录和文件。然后用FTP上传即可。保存下面内容为:create.vbs
Option Explicit
Dim objFSO, objFolder, strDirectory, strDirectory2
strDirectory = "D:zhaiduo.compage"
Set objFSO = CreateObject("Scripting.FileSystemObject")

Dim I
For I = 1 To 55
strDirectory2=strDirectory & "" & I
Set objFolder = objFSO.CreateFolder(strDirectory2)
WScript.Echo "Just created " & strDirectory2
CreateIndexFile strDirectory2, I
WScript.Echo "Just created " & strDirectory2 & "index.php"
Next

WScript.Quit
'end

Sub CreateIndexFile(Folder,I)
Dim TextStream
Set TextStream = objFSO.CreateTextFile(Folder & "index.php")
TextStream.WriteLine("")
TextStream.Close
End Sub

双击运行即可。



下一页


最 近 文 章

  1. 测试Alternativa3D - Wed, 18 Mar 2009 05:29:00 +0000
  2. 中国电信在搞TMDde什么鬼? - Mon, 09 Mar 2009 07:58:00 +0000
  3. UTF8的BOM让FirFox一片空白 - Sat, 07 Mar 2009 18:57:00 +0000
  4. Blender导出Dae文件到Papervision3D的方法 - Thu, 05 Mar 2009 02:03:00 +0000
  5. 再次遭受黑客代码嵌入 - Fri, 27 Feb 2009 02:23:00 +0000
  6. 我是FLash三维实时渲染的忠实粉丝 - Sat, 21 Feb 2009 13:08:00 +0000
  7. 神秘的lightbox.js错误 - Thu, 19 Feb 2009 17:04:00 +0000
  8. Javascript与swf对象交互的问题 - Tue, 10 Feb 2009 08:51:00 +0000
  9. 集成phpBB3论坛 - Fri, 06 Feb 2009 10:05:00 +0000
  10. Cube使用ShadedMaterial材质的黑三角型问题 - Tue, 03 Feb 2009 08:33:00 +0000