Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 18

Discussione: creare una sitemap

  1. #1

    creare una sitemap

    come si crea una sitemap? esistono dei software o bisogna crearla a mano? cosa mi consigliate?

  2. #2
    Puoi crearla sia a mano, sia "via software" (con strumenti tipo http://www.vigos.com/products/gsitemap/ ); oppure la crei via software e la "ritocchi" a mano (meglio).
    Mi interesso di web marketing e posizionamento nei motori di ricerca , e ogni tanto posto sul mio blog

  3. #3
    ho utilizzato il software che mi hai consigliato, però no notato qualcosa di strano... mi spiego con un esempio:

    il mio sito ha i file contenuti in una dir:
    http:\\www.miosito.it\0122\

    quando faccio la scansione con il programma, nei risultati viene omessa la dir 0122 vala a dire ottengo una serie di url con il percorso errato. Come mai? da cosa dipende?

  4. #4
    Utente di HTML.it L'avatar di Evi|A|ivE
    Registrato dal
    Jun 2002
    Messaggi
    2,171
    mah...

    ecco un link incredibile pieno id informzioni utilissime!!

    ED E' GRATISSSSSSSSS
    http://forum.html.it/forum/search.ph...der=descending

    (sono troooppo antipaticooooooo)
    [Disclaimer: le | nel nome non son li per far figo, evito solo di trovarmi spammato il nick nelle millemila pagine del forum in serp ..]

  5. #5
    diciamo che hai tanto tempo da perdere

  6. #6
    ho trovato questo script interessante in asp, solamente che quando genera la pagina xml, l'url del sito contiene anche il percorso fisico della pagina, provatelo un pò
    <%
    ' sitemap_gen.asp
    ' A simple script to automatically produce sitemaps for a webserver, in the Google Sitemap Protocol (GSP)
    ' by Francesco Passantino
    ' www.iteam5.net/francesco/sitemap_gen
    ' v0.1 04.06.05
    ' v0.2 05.06.05 Listing a directory tree recursively improvement
    ' v0.3b 09.06.05 File exclusion by Calvin Dunkley
    ' v0.4 17.06.05 iso8601dates http://www.tumanov.com/projects/scri...o8601dates.asp
    ' v0.4b 18.06.05 vdrir bug fixed
    ' v0.4c 13.07.05 phisical dir patch for some windows systems
    '
    ' BSD 2.0 license,
    ' http://www.opensource.org/licenses/bsd-license.php


    'modify this to change website, virtual directory and phisical directory
    session("server")="http://www.yourdomain.net"
    vDir = "/"
    phisicalDir="C:\Inetpub\wwwroot\"

    'see http://www.time.gov/ for utcOffset
    utcOffset=1


    set objfso = CreateObject("Scripting.FileSystemObject")
    root = Server.MapPath(vDir)

    response.ContentType = "text/xml"
    response.write "<?xml version='1.0' encoding='UTF-8'?>"
    response.write ""
    response.write "<urlset xmlns='http://www.google.com/schemas/sitemap/0.84'>"

    Set objFolder = objFSO.GetFolder(root)
    'response.write getfilelink(objFolder.Path,objFolder.dateLastModif ied)
    Set colFiles = objFolder.Files
    For Each objFile In colFiles
    response.write getfilelink(objFile.Path,objfile.dateLastModified)
    Next
    ShowSubFolders(objFolder)

    response.write "</urlset>"
    set fso = nothing


    Sub ShowSubFolders(objFolder)
    Set colFolders = objFolder.SubFolders
    For Each objSubFolder In colFolders
    if folderpermission(objSubFolder.Path) then
    response.write getfilelink(objSubFolder.Path,objSubFolder.dateLas tModified)
    Set colFiles = objSubFolder.Files
    For Each objFile In colFiles
    response.write getfilelink(objFile.Path,objFile.dateLastModified)
    Next
    ShowSubFolders(objSubFolder)
    end if
    Next
    End Sub


    Function getfilelink(file,data)
    file=replace(file,phisicalDir,"")
    file=replace(file,"\","/")
    If FileExtensionIsBad(file) then Exit Function
    If FileNameIsBad(file) then Exit Function
    filelmdate=iso8601date(data,utcOffset)

    getfilelink = "<url><loc>"&server.htmlencode(session("server")&f ile)&"</loc><lastmod>"&filelmdate&"</lastmod><priority>1.0</priority></url>"
    session("URLS")=session("URLS")+1
    Response.Flush
    End Function


    Function Folderpermission(pathName)
    'modify this to exclude path
    PathExclusion=Array("\temp","\_vti_cnf","\_vti_pvt ","\_vti_log","\cgi-bin")
    Folderpermission =True
    for each PathExcluded in PathExclusion
    if instr(ucase(pathName),ucase(PathExcluded))>0 then
    Folderpermission = False
    exit for
    end if
    next
    End Function


    Function FileExtensionIsBad(sFileName)
    Dim sFileExtension, bFileExtensionIsValid, sFileExt
    'http://www.googleguide.com/file_type.html
    Extensions = Array("png","gif","jpg","zip","pdf","ps","html","h tm","asp","wk1","wk2","wk3","wk4","wk5","wki","wks ","wku","lwp","mw","xls","ppt","doc","wks","wps"," wdb","wri","rtf","ans","txt")

    if len(trim(sFileName)) = 0 then
    FileExtensionIsBad = true
    Exit Function
    end if

    sFileExtension = right(sFileName, len(sFileName) - instrrev(sFileName, "."))
    bFileExtensionIsValid = false 'assume extension is bad
    for each sFileExt in extensions
    if ucase(sFileExt) = ucase(sFileExtension) then
    bFileExtensionIsValid = True
    exit for
    end if
    next
    FileExtensionIsBad = not bFileExtensionIsValid
    End Function

    Function FileNameIsBad(sFileName)
    if len(trim(sFileName)) = 0 then
    FileNameIsBad = true
    Exit Function
    end if
    Filename = Array("/alive.asp","/404.asp","/500.asp","/sitemap_gen.asp")
    FileNameNumber = ubound(Filename)
    for i=0 to FileNameNumber
    if Filename(i) = sFileName then
    FileNameIsBad = True
    end if
    next
    End Function

    Function iso8601date(dLocal,utcOffset)
    Dim d
    ' convert local time into UTC
    d = DateAdd("H",-1 * utcOffset,dLocal)

    ' compose the date
    iso8601date = Year(d) & "-" & Right("0" & Month(d),2) & "-" & Right("0" & Day(d),2) & "T" & _
    Right("0" & Hour(d),2) & ":" & Right("0" & Minute(d),2) & ":" & Right("0" & Second(d),2) & "Z"
    End Function
    %>

  7. #7
    nessuno ha provato questo script?

  8. #8

    sitemap

    Il codice è da modificare in alcuni punti per poter funzionare, è un'ottimo script ma ha alcune lacune per poter funzionare sul server aruba dove io ho il mio dominio.

    Eccolo qui in funzione sul mio dominio www.x.com/sitemap.asp

    Ecco le correzioni da eseguire:

    Function getfilelink(file,data)
    file=replace(file,phisicalDir,"")
    file=replace(file,"\","/")
    If FileExtensionIsBad(file) then Exit Function
    If FileNameIsBad(file) then Exit Function
    filelmdate=iso8601date(data,utcOffset)


    orig = (session("server")&file)
    sost = "/D:/Inetpub/webs/forza46com/"
    ris = "/"


    stringa = Replace( orig, sost, ris )




    getfilelink = "<url><loc>"&stringa&"</loc><lastmod>"&filelmdate&"</lastmod><priority>1.0</priority></url>"


    e poi anche qui:

    Function FileNameIsBad(sFileName)
    if len(trim(sFileName)) = 0 then
    FileNameIsBad = true
    Exit Function
    end if

    pp = "D:/Inetpub/webs/forza46com/"

    Filename = Array(""&pp&"postinfo.html", ""&pp&"_vti_inf.html")
    FileNameNumber = ubound(Filename)
    for i=0 to FileNameNumber
    if Filename(i) = sFileName then
    FileNameIsBad = True
    end if
    next
    End Function
    Ciao a tutti e sempre forza vale www.forza46.com

  9. #9

    Re: creare una sitemap

    Originariamente inviato da maxcondor
    come si crea una sitemap? esistono dei software o bisogna crearla a mano? cosa mi consigliate?
    se il tuo sito è statico oppure ha 10 pagine o poco più fai prima a farla a mano

  10. #10
    ho fatto le modifiche proposte da forza46 , ma (sono su aruba) non mi crea il file correttamente.
    questo è il codice:

    <%

    'modify this to change website, virtual directory and phisical directory
    session("server") = "http://www.xxxxxxxxx.it"
    vDir = "/"
    phisicalDir="D:\Inetpub\webs\xxxxxxxxxit\"

    'see http://www.time.gov/ for utcOffset
    utcOffset=1


    set objfso = CreateObject("Scripting.FileSystemObject")
    root = Server.MapPath(vDir)

    response.ContentType = "text/xml"
    response.write "<?xml version='1.0' encoding='UTF-8'?>"
    response.write "<urlset xmlns='http://www.google.com/schemas/sitemap/0.84'>"

    Set objFolder = objFSO.GetFolder(root)
    'response.write getfilelink(objFolder.Path,objFolder.dateLastModif ied)
    Set colFiles = objFolder.Files
    For Each objFile In colFiles
    response.write getfilelink(objFile.Path,objfile.dateLastModified)
    Next
    ShowSubFolders(objFolder)

    response.write "</urlset>"
    set fso = nothing


    Sub ShowSubFolders(objFolder)
    Set colFolders = objFolder.SubFolders
    For Each objSubFolder In colFolders
    if folderpermission(objSubFolder.Path) then
    response.write getfilelink(objSubFolder.Path,objSubFolder.dateLas tModified)
    Set colFiles = objSubFolder.Files
    For Each objFile In colFiles
    response.write getfilelink(objFile.Path,objFile.dateLastModified)
    Next
    ShowSubFolders(objSubFolder)
    end if
    Next
    End Sub

    Function getfilelink(file,data)
    file=replace(file,phisicalDir,"")
    file=replace(file,"\","/")
    If FileExtensionIsBad(file) then Exit Function
    If FileNameIsBad(file) then Exit Function
    filelmdate=iso8601date(data,utcOffset)
    orig = (session("server")&file)
    sost = "/D:/Inetpub/webs/xxxxxxxxxit/"
    ris = "/"
    stringa = Replace( orig, sost, ris )
    'response.Write stringa
    getfilelink = "<url><loc>"&stringa&"</loc><lastmod>"&filelmdate&"</lastmod><priority>1.0</priority></url>"
    'getfilelink = "<url><loc>"&server.htmlencode(session("server")&f ile)&"</loc><lastmod>"&filelmdate&"</lastmod><priority>1.0</priority></url>"
    session("URLS")=session("URLS")+1
    Response.Flush
    End Function




    Function Folderpermission(pathName)
    'modify this to exclude path
    PathExclusion=Array("\temp","\_vti_cnf","\_vti_pvt ","\_vti_log","\cgi-bin")
    Folderpermission =True
    for each PathExcluded in PathExclusion
    if instr(ucase(pathName),ucase(PathExcluded))>0 then
    Folderpermission = False
    exit for
    end if
    next
    End Function


    Function FileExtensionIsBad(sFileName)
    Dim sFileExtension, bFileExtensionIsValid, sFileExt
    'http://www.googleguide.com/file_type.html
    Extensions = Array("png","gif","jpg","zip","pdf","ps","html","h tm","asp","wk1","wk2","wk3","wk4","wk5","wki","wks ","wku","lwp","mw","xls","ppt","doc","wks","wps"," wdb","wri","rtf","ans","txt")

    if len(trim(sFileName)) = 0 then
    FileExtensionIsBad = true
    Exit Function
    end if

    sFileExtension = right(sFileName, len(sFileName) - instrrev(sFileName, "."))
    bFileExtensionIsValid = false 'assume extension is bad
    for each sFileExt in extensions
    if ucase(sFileExt) = ucase(sFileExtension) then
    bFileExtensionIsValid = True
    exit for
    end if
    next
    FileExtensionIsBad = not bFileExtensionIsValid
    End Function

    'Function FileNameIsBad(sFileName)
    ' if len(trim(sFileName)) = 0 then
    ' FileNameIsBad = true
    ' Exit Function
    ' end if
    ' Filename = Array("/alive.asp","/404.asp","/500.asp","/sitemap_gen.asp")
    ' FileNameNumber = ubound(Filename)
    ' for i=0 to FileNameNumber
    ' if Filename(i) = sFileName then
    ' FileNameIsBad = True
    ' end if
    'next
    'End Function
    Function FileNameIsBad(sFileName)
    if len(trim(sFileName)) = 0 then
    FileNameIsBad = true
    Exit Function
    end if

    pp = "D:/Inetpub/webs/xxxxxxxxxit/"

    Filename = Array(""&pp&"postinfo.html", ""&pp&"_vti_inf.html")
    FileNameNumber = ubound(Filename)
    for i=0 to FileNameNumber
    if Filename(i) = sFileName then
    FileNameIsBad = True
    end if
    next
    End Function


    Function iso8601date(dLocal,utcOffset)
    Dim d
    ' convert local time into UTC
    d = DateAdd("H",-1 * utcOffset,dLocal)

    ' compose the date
    iso8601date = Year(d) & "-" & Right("0" & Month(d),2) & "-" & Right("0" & Day(d),2) & "T" & _
    Right("0" & Hour(d),2) & ":" & Right("0" & Minute(d),2) & ":" & Right("0" & Second(d),2) & "Z"
    End Function
    %>




    e l'xml è così:

    <?xml version="1.0" encoding="UTF-8" ?>
    - <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
    - <url>
    <loc>http://www.xxxxxxx.itD:/inetpub/webs...aborazioni.asp</loc>
    <lastmod>2008-04-30T11:14:15Z</lastmod>
    <priority>1.0</priority>
    </url>
    - <url>
    <loc>http://www.xxxxxxx.itD:/inetpub/webs/xxxxxxxit/conn.asp</loc>
    <lastmod>2008-06-30T15:18:03Z</lastmod>
    <priority>1.0</priority>
    </url>


    HELP!!!!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.