互聯(lián)網(wǎng)品牌整合服務(wù)·為夢(mèng)想者創(chuàng )造夢(mèng)想品牌

服務(wù)1000+企業(yè),專(zhuān)注企業(yè)網(wǎng)站設計 / 網(wǎng)站制作 / 網(wǎng)站優(yōu)化推廣 網(wǎng)站托管服務(wù)

了解詳情

致力于服務(wù)頭部企業(yè).打造標桿項目

讓每一個(gè)作品融入我們的洞察力,創(chuàng )造并呈現精彩 展現您的非凡與不同

了解詳情

網(wǎng)站優(yōu)化 網(wǎng)站搜索排名

濰坊及全國各地區提供搜索引擎優(yōu)化服務(wù)

了解詳情

網(wǎng)站偽靜態(tài)規則生成代碼可嵌入網(wǎng)站后臺管理

發(fā)布時(shí)間:2016/2/23 15:58:18 關(guān)注:1663


為方便網(wǎng)站修改維護偽靜態(tài)規則,本站放出自己使用的網(wǎng)站偽靜態(tài)規則生成小程序。

PS:網(wǎng)站偽靜態(tài)能夠提高網(wǎng)站訪(fǎng)問(wèn)體驗,增加搜索引擎對網(wǎng)站的收錄,是SEOER必不可少的SEO法寶之一。


<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% dim rulePath
rulePath="/.htaccess"
 %>
<style type="text/css">
form textarea{ border:#ececec solid 3px; background:#F8F8F8}
input[type="submit"]{ height:35px;  width:100px;}
</style>

<form name="form1" method="post" action="?act=1">
  <p>
    <label for="rullContent"></label>
    <textarea name="rullContent" id="rullContent" cols="90" rows="20"><%=FsoReadFile(rulePath) %></textarea></p>
  <p><input type="submit" name="button" id="button" value="提交"></p>
</form>

<% 
'========讀取原來(lái)的規則=======================
Function FsoReadFile(filePath) 
  dim objFSO,objCountFile
  filePath=server.MapPath(filePath)
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject") 
  IF objFSO.FileExists(filePath)=true Then'判斷文件是否存在和文件有內容
     if objFSO.getfile(filePath).Size>0 then
		Set objCountFile = objFSO.OpenTextFile(filePath,1,True) 
		FSOReadFile = objCountFile.ReadAll 
		objCountFile.Close 
		Set objCountFile=Nothing 
    else
	   Response.Write("定義規則為空,請開(kāi)始定義規則")
	end if
  Else
      Response.Write("您還未開(kāi)通,點(diǎn)擊獲按鈕取即可開(kāi)通")
  End if
  Set objFSO = Nothing 
End Function 
'=============創(chuàng  )建規則========================
 Function createFile(filePath,objStr ) 
  Dim fileObj,objFSO
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject") 
     '刪除原來(lái)的文件
		IF objFSO.FileExists(filePath)=true Then 
		objFSO.DeleteFile (filePath)
		else
		 objFSO.CreateTextFile (filePath)
		End IF 
	'獲取連接信息 
	 Set fileObj = objFSO.opentextfile(filePath,2,true) '
	 fileObj.Writeline objStr '向文件寫(xiě)入數據,覆蓋形式寫(xiě)入
	 Set objFSO = Nothing 
 End Function  
 if clng(request.QueryString("act"))=1 then
    call createFile(rulePath,request.Form("rullContent"))
	Response.Write("<script>alert('成功生成偽靜態(tài)文件!');this.location.href='reWrite.asp';</script>")
 end if

 %>

點(diǎn)擊下載:偽靜態(tài)生成


  • 上一條:網(wǎng)站關(guān)鍵詞的排名為什么會(huì )經(jīng)常波動(dòng)
  • 下一條:公司與濰坊晨光數控達成合作關(guān)系
  • 濰坊網(wǎng)站建設,濰坊網(wǎng)站優(yōu)化,濰坊網(wǎng)站排名,濰坊網(wǎng)站改版,濰坊網(wǎng)站營(yíng)銷(xiāo)策劃,濰坊網(wǎng)站制作,濰坊網(wǎng)站托管,濰坊網(wǎng)站百度排名,濰坊網(wǎng)站培訓,濰坊seo培訓,濰坊網(wǎng)絡(luò )公司

    地址:山東省濰坊奎文區新華路樂(lè )川街華誼大廈三樓

    網(wǎng)址:http://m.hwj688.cn/ 垂詢(xún)電話(huà):

    網(wǎng)站備案:魯ICP備14027302號-5

    copyright© 濰坊華邦網(wǎng)絡(luò )有限公司2011-2025

    天海翼一区二区_亚洲国产超清无码专区_2021av天堂网手机版在线播放_日韩人妻无码专区精品