Ayuda! url sin fecha

  • Autor Autor jcduranm
  • Fecha de inicio Fecha de inicio
jcduranm

jcduranm

Gamma
Verificación en dos pasos activada
Verificado por Whatsapp
¡Ha verificado su Paypal!
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
hola amigos estoy por hacer un blog llamado JcDuranM instale este script
Insertar CODE, HTML o PHP:
<script type='text/javascript'>
var config={postsDatePrefix:!1,accessOnly:!1,useApiV3:!1,apiKey:&quot;AIza**********AQUI VA MI API KEY********Gv_owClxgs&quot;}
var postsOrPages=[&quot;pages&quot;,&quot;posts&quot;],blogId=&quot;<data:blog.blogId/>&quot;,urlTotal,fetchIndex=1,ampChar=&quot;&amp;&quot;[0],secondRequest=!0,feedPriority=0,nextPageToken;function urlVal(){var url=window.location.pathname;var length=url.length;var urlEnd=url.substring(length-5);if(urlEnd===&quot;.html&quot;)return 0;else if(length&gt;1)return 1;else return 2}
function urlMod(){var url=window.location.pathname;if(url.substring(1,2)===&quot;p&quot;){url=url.substring(url.indexOf(&quot;/&quot;,1)+1);url=url.substr(0,url.indexOf(&quot;.html&quot;));history.replaceState(null,null,&quot;../&quot;+url)}else{if(!config.postsDatePrefix)url=url.substring(url.indexOf(&quot;/&quot;,7)+1);else url=url.substring(1);url=url.substr(0,url.indexOf(&quot;.html&quot;));history.replaceState(null,null,&quot;../../&quot;+url)}}
function urlSearch(url,database){var pathname=url+&quot;.html&quot;;database.forEach(function(element){var search=element.search(pathname);if(search!==-1)window.location=element})}
function urlManager(){var validation=urlVal();if(validation===0){if(!config.accessOnly)urlMod()}else if(validation===1){fetchData(postsOrPages[feedPriority],1)}else if(validation===2){if(!config.accessOnly)history.replaceState(null,null,&quot;/&quot;)}}
function fetchData(postsOrPages,index){var script=document.createElement(&quot;script&quot;);if(config.useApiV3){var jsonUrl=&quot;https://www.googleapis.com/blogger/v3/blogs/&quot;+blogId+&quot;/&quot;+postsOrPages+&quot;?key=&quot;+config.apiKey+&quot;#maxResults=500#fields=nextPageToken%2Citems(url)#callback=parseData&quot;;if(nextPageToken)jsonUrl+=&quot;#pageToken=&quot;+nextPageToken;nextPageToken=undefined}else{var jsonUrl=window.location.protocol+&quot;//&quot;+window.location.hostname+&quot;/feeds/&quot;+postsOrPages+&quot;/summary?start-index=&quot;+index+&quot;#max-results=150#orderby=published#alt=json-in-script#callback=parseData&quot;}
jsonUrl=jsonUrl.replace(/#/g,ampChar);script.type=&quot;text/javascript&quot;;script.src=jsonUrl;document.getElementsByTagName(&quot;head&quot;)[0].appendChild(script)}
function parseData(json){var database=[];if(!config.useApiV3){if(!urlTotal){urlTotal=parseInt(json.feed.openSearch$totalResults.$t)}
try{json.feed.entry.forEach(function(element,index){var entry=json.feed.entry[index];entry.link.forEach(function(element,index){if(entry.link[index].rel===&quot;alternate&quot;)database.push(entry.link[index].href)})})}catch(e){}}else{try{json.items.forEach(function(element,index){database.push(element.url)})}catch(e){}
nextPageToken=json.nextPageToken}
urlSearch(window.location.pathname,database);if(urlTotal&gt;150){fetchIndex+=150;urlTotal-=150;fetchData(postsOrPages[feedPriority],fetchIndex)}else if(nextPageToken){fetchData(postsOrPages[feedPriority])}else if(secondRequest){nextPageToken=undefined;urlTotal=0;fetchIndex=1;secondRequest=!0;if(feedPriority===0){feedPriority=1;fetchData(&quot;posts&quot;,1)}else if(feedPriority===1){feedPriority=0;fetchData(&quot;pages&quot;,1)}}}
function bloggerJS(priority){if(priority)feedPriority=priority;urlManager()}
bloggerJS()
</script>

entonces me quita los encales con fechas y/o las paginas el tag /p/ pero cuando aplano F5 para recargar la pagina primero me sale un error 404 no dura mucho pero es incomodo como puedo solucionarlo
 
No comprendo tu pregunta, quieres quitar la fecha de publicacion de la url de entradas en blogger? Es lo que quieres?
 
No comprendo tu pregunta, quieres quitar la fecha de publicacion de la url de entradas en blogger? Es lo que quieres?
gracias por responder.
eso ya lo hice el problema es que si recargo la pagina me sale error 404
 
El 404 es mientras reconoce la dirección, prueba colocar el código en el head lo mas arriba posible o sino vuelve a las url normales que no tienen ningún defecto.
 
gracias por responder.
eso ya lo hice el problema es que si recargo la pagina me sale error 404

Por lo que me dices tienes algun script que reedireciona el index al 404 causando una confucion en el tema a la hora de recargar la pagina, si gustas enviame MP talvez pueda ayudarte.
 
Atrás
Arriba