Search engine optimization for dynamic Network forum

Source: Internet
Author: User
Tags exit end include modify net servervariables split trim
Search Engine | optimization | search Engine | optimization
Today, the Car Meter Network forum for optimization, found that the Dynamic Network Forum 7.0 has taken into account the search engine problem, simply to modify can be very good optimization.

Dynamic Network forum using javascript+ template to display the page, the server will not deep processing of data and JS code sent to the client to resolve, reduce the burden on the server, but the search engine generally will not parse JavaScript code, but the main page of the Dynamic Network forum have to judge the type of browser , if it is a search engine, automatically jump to the page specifically for the browser display, but these pages do not do too well, the following is the result of my changes:


Yesterday I removed the description part of the forum's meta tag, and Google found the tag and ignored the contents of the direct area tag.

Modify Index.asp:

In the function sub Show_index_footer ()

Dim BrowserType

If browsertype.issearch Then Response.Redirect "indexnew.asp"

Upgrade to the front of the index.asp, so that the page one detection is the search engine to jump to the optimized page, the original result is that Google only grabbed the show_index_footer () information, the front of all to ignore.

Modify Indexnew.asp

Change Dvbbs.head () to Dvbbs.head ()

Comment out

Dvbbs.activeonline ()

Show_index_top

Show_index_footer

Response.Write Replace (template.html (9), "{$Getlink}", GetLink ())

If dvbbs.forum_setting = "1" Then call Birthuser ()

Dvbbs.footer ()

Response.Write Dvbbs.value

Response.Write template.html (8) (1)

Such a child after the first page to show the relatively simple, but the code is still some redundancy, if you want to streamline some, do not use the Dvbbs template, directly using ASP to generate static pages, can be removed from the.

Similarly modify list_show.asp

Change Dvbbs.head () to Dvbbs.head ()

Comment out

News

Board_online

Show_list_footer

Dvbbs.activeonline ()

Dvbbs.footer ()

Then modify the printpage.asp

If your forum needs a registered user to browse, and you want the search engine to be able to crawl the information, the If dvbbs.groupsetting (2) = "0" Then Dvbbs.adderrcode (31) This line commented out.

The other is nothing to change, the template of this page has been done very streamlined, you can try to modify the Page_postjob template to add some other connections.

Here is a more effective index page, a lot of good PHP forums have such a page, the effect is very good:

Create a new directory, whatever, and then create a index.asp file inside, this file code I used the Dynamic Network forum newtopic.asp, the inside of JS removed on the line:

<!--#include file= ". /conn.asp "-->
<!--#Include file= ". /inc/dv_clsmain.asp "-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>

<title> Car Meter net </title>
<link rel= "stylesheet" href= ". /style.css "type=" Text/css "/>
<body>
<div class= "Main" >
<div class= "Top" ><a href= ". /index.asp "> Auto Meter net </a>-Forum new post </div>
<div class= "Body" >
<%
' Dvbbs 7.0 dynamic Network Forum first call-----theme call
Dim Bbsurl,lockboardid,picurl
' ########### #以下为修改项 ######################
Dim Lockurl
Lockurl= ""
' Only allow call URLs, start with ' http://', and do not open this feature for empty. (multiple URL restrictions can be allowed, separated by ",".) )
' For example, allow only these two URLs: lockurl= "http://www.artistsky.net/,http://www.artbbs.net/"
Bbsurl= "http://bbs.my-car.cn/", please fill in the correct address of your forum, start with "http://"
Lockboardid= "1,2,3", please fill in the Limit Call forum section ID, separated by commas. (When lock parameter is 1, 2 o'clock is effective)
Picurl= "http://bbs.my-car.cn/skins/default/topicface/" ' Mood icon directory address
' ########### #以上为修改项 ######################
' Bbsurl=getservepath (Request. ServerVariables ("SERVER_NAME") &request. ServerVariables ("URL"))
' Function Getservepath (str)
' Dim tmpstr
' Tmpstr=split (str, "/")
' getservepath= ' http://' &replace (str, TMPSTR (UBound (TMPSTR)), "")
' End Function
'*************************************
' uploaded to the directory with the conn.asp sibling
' Above address parameters must be modified, otherwise the link being invoked is going to the forum above.
' If there is a problem, you can run the uploaded newscode together. ASP file for debugging (Newscode. To modify the invocation parameters before ASP runs
' Fssunwin 2003.12.31
'*************************************
' If Trim (lockurl) <> "" and Checkserver (Lockurl) =false Then
' Response.Write ' document.write (' data is protected from calls by other sites! ')
' Response.End
' End If

Private function Checkserver (str)
Dim i,servername
Checkserver=false
If str= "" Then Exit function
Str=split (Cstr (str), ",")
Servername=request.servervariables ("Http_referer")
For i=0 to Ubound (str)
If Right (str (i), 1) = "/" then STR (i) =left (Trim (str (i)), Len (str (i))-1)
If Lcase (Left (Servername,len (str (i))) =lcase (str (i)) then
Checkserver=true
Exit For
Else
Checkserver=false
End If
Next
End Function

Dim rs,sql
Dim orders,reply,topic,isbest,lock,board,action,info,tlen,showpic
Dim bname,ars
Dim postinfo,postname,posttime
Dim Nowusebbs,boardname,boardid
Dim i,k,n,sdate,searchdate
I=0:k=0
Lock=0 ' CInt (Trim (Request ("lock"))
Orders=4 ' Trim (Request ("Orders"))
Boardid= "All" ' Trim (Request ("Boardid"))
Sdate=3 ' Trim (Request ("Sdate"))
Action=1 ' CInt (Request ("action"))
Info=3 ' request ("info")
Tlen=16 ' request ("Tlen")
Reply=0 ' request ("reply")
Showpic=0 ' request ("Showpic")
N=100 ' Trim (Request ("n"))
Bname=0 ' request ("bname")
If n<> "" and IsNumeric (n) Then
N=cint (N)
Else
N=1
End If

If Orders=1 Then
orders= "Hits Desc,"
Elseif orders=2 or orders=3 Then
orders= "DateAndTime desc,"
End If
If Boar



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.