<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog de diseño web y diseño grafico &#187; Htaccess</title>
	<atom:link href="http://www.mydesign.com.es/blog/category/htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mydesign.com.es/blog</link>
	<description>herramientas, recursos y codigo para la web</description>
	<lastBuildDate>Mon, 15 Feb 2010 14:54:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Usos de .htaccess Tutorial SEO</title>
		<link>http://www.mydesign.com.es/blog/usos-de-htaccess-tutorial-seo/</link>
		<comments>http://www.mydesign.com.es/blog/usos-de-htaccess-tutorial-seo/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 16:14:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Htaccess]]></category>
		<category><![CDATA[redireccionamiento web]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.mydesign.com.es/blog/?p=115</guid>
		<description><![CDATA[Investigando para una web que necesitabamos realizar, la cual llevaba redireccionamientos complejos, me encontre con este exelente tutorial en el cual se explica paso a paso y de una manera super clara todas las mas importantes opciones que se utilizan en los redireccionamientos a traves del archivo .htaccess
El archivo .htaccess es un documento oculto que [...]]]></description>
			<content:encoded><![CDATA[<p>Investigando para una web que necesitabamos realizar, la cual llevaba redireccionamientos complejos, me encontre con este exelente tutorial en el cual se explica paso a paso y de una manera super clara todas las mas importantes opciones que se utilizan en los redireccionamientos a traves del archivo .htaccess</p>
<p><span>El archivo .htaccess </span><span>es un documento oculto que se encuentra en los directorios en los que se desea que se ejecuten <span> </span></span></p>
<input name="IL_MARKER" type="hidden" />una serie de directrices del Servidor antes de ejecutar las peticiones PHP.</p>
<h2>Usos del .htaccess</h2>
<ul>
<li><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Redirecciones</strong></span></li>
<li><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Permisos en carpetas</strong></span></li>
<li><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Bloquear usuarios a través de IP</strong></span></li>
<li><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Obligar el uso o la ausencia del www.</strong></span></li>
<li><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span>Interpretar ULRs amigables que lean <span><br />
<input name="IL_MARKER" type="hidden" />URLs</span> dinámicas</span></strong></span></li>
<li><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Interpretar extensiones (como xml o txt) para que lean archivos php</strong></span></li>
<li><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Crear un mensaje de Error personalizado</strong></span></li>
<li> etc</li>
</ul>
<div style="text-align: center;"><a href="http://img222.imageshack.us/img222/5830/htaccessve2.gif" target="_blank"><img style="border: 1px solid #cccccc; padding: 4px; background-color: #ffffff; width: 464px;" src="http://img222.imageshack.us/img222/5830/htaccessve2.gif" alt="" /></a></div>
<p><span id="more-115"></span></p>
<p>A continuación te presentaré <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>5 Trucos del <span>archivo</span> .</span><span>htaccess</span></span></strong></span> que le garantiza estar bien optimizado y que Google<span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span> </span></strong></span> lo considere <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>amigable</strong></span> para un buen posicionamiento.</p>
<p><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Antes que nada</strong></span></p>
<p>Para crear un documento <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>htaccess</span></span></strong></span><span><span> lo que tienes que hacer es abrir <span> </span></span></span></p>
<input name="IL_MARKER" type="hidden" />una nueva hoja txt del block de notas y a la hora de guardarla darle el hombre de .<span>htaccess</span>, muy importante el . (punto), porque reemplaza la extension .txt</p>
<p>Los trucos que te daré a continuación van en el root de la cuenta, es decir, justo en el /public_html/</p>
<p><span> Lo primero es escribir estas directrices al inicio del <span>archivo</span>:</span></p>
<p>#### START REDIRECCIONES #####<br />
Options +FollowSymLinks<br />
RewriteEngine on</p>
<p>Con ello activamos las reglas de sobreescritura, redirección y tal.</p>
<h3>1. Obligar el uso del www.</h3>
<p>Existe debate respecto a este punto. Algunos dicen que es mejor <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>con el www.</strong></span> otros dicen que <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>sin</strong></span>, ahí gusto al cliente. Lo que yo te puedo decir, en base a mi experiencia, es que el común de los mortales relaciona el <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Internet con el uso del www. y el .com</strong></span>, si saben que tu sitio se llama &#8220;mydesign.com.es&#8221; intentarán escribir www.mydesign.com.es.</p>
<p>Como <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>webmaster</strong></span>, lo que debes tener muy claro, es que <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>Google</span></span></strong></span><span> te exije uno u otra variación, pero no las dos ya que serían interpretados como dos sitios distintos que a la larga te provocarían un gran dolor de cabeza.</span></p>
<p>Exigir el uso del www:</p>
<p>##### sin-www a www #####<br />
RewriteCond %{HTTP_HOST} ^cherada.com [NC]<br />
RewriteRule ^(.*)$ http://www.cherada.com/$1 [L,R=301]</p>
<p><span> Por cierto el # numeral es para hacer comentarios, cuandoquiera que <span> </span></span></p>
<input name="IL_MARKER" type="hidden" />una linea comienza con # esa linea no es directriz sino comentario.</p>
<p><span> Esa regla indica que si alguien escribe cherada.com o cherada.com/clasicados.html serán redireccionados instantaneamente a www.cherada.com y www.cherada.com/clasificados.html. El R=301 significa que es una redirección de caracter permanente.</span></p>
<h3>2. Lectura de URLs amigables por sus respectivas rutas dinámicas</h3>
<p>Para esto ya tendrías que haber logrado en base a <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>PHP</strong></span> la creación adecuada de las <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>URLs</span> amigables</span></strong></span> (clic: Leer más al respecto). Asumiendo eso ahora nos corresponde ejecutar en <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>htaccess</span></span></strong></span><span> la segunda parte del proceso: lograr que esas <span>URLs</span> amigables sean leídas a través de sus respectivas </span><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>URLs</span> dinámicas</span></strong></span>.</p>
<p><span> <span> </span></span></p>
<input name="IL_MARKER" type="hidden" />Una URL amigable luce así:</p>
<p>http://www.cherada.com/info/do/contact.html</p>
<p>Y su respectiva URL dinámica luciría de esta manera:</p>
<p>http://www.cherada.com/?seccion=info&amp;do=contact</p>
<p>Nótese que &#8220;seccion&#8221; no aparece en la <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>URL amigable</strong></span><span>, esto lo he hecho deliberadamente ya que todas las <span>URLs</span> de cherada surgen a traves de un seccion= así que me puedo ahorrar ese espacio (que lo puedo ocupar para alguna otra variable).</span></p>
<p><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span> </span></span></strong></span></p>
<p><strong></p>
<input name="IL_MARKER" type="hidden" />htaccess</strong> permite leer hasta un maximo de 9 variables (o carpetas) en la <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>URL amigable</strong></span>, es decir algo como esto: http://www.cherada.com/1/2/3/4/5/6/7/8/9.html</p>
<p>Las rutinas <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span> </span></span></strong></span></p>
<p><strong></p>
<input name="IL_MARKER" type="hidden" />htaccess</strong> las escribo desde la posibilidad más amplia posible hasta la más reducida dando como resultado esto:</p>
<p><span> #### CASOS GENERALES de <span> </span></span></p>
<input name="IL_MARKER" type="hidden" />URLs amigables ####<br />
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2=$3&amp;$4=$5&amp;$6=$7&amp;$8=$9 [L]<br />
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2=$3&amp;$4=$5&amp;$6=$7&amp;$8= [L]<br />
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2=$3&amp;$4=$5&amp;$6=$7 [L]<br />
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2=$3&amp;$4=$5&amp;$6= [L]<br />
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2=$3&amp;$4=$5 [L]<br />
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2=$3&amp;$4= [L]<br />
RewriteRule ^([^/]+)/([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2=$3 [L]<br />
RewriteRule ^([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2= [L]<br />
RewriteRule ^([^/]+).html$ /index.php?seccion=$1 [L]</p>
<p><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Interpretación:</strong></span> el primer paréntesis ([^/]+) correspondería a la seccion que quiero ubicar. A partir de ahí van parejas de paréntesis /([^/]+)/([^/]+) que corresponderían en <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>PHP</strong></span> a &amp;variableX=valorX y así sucesivamente. Ojo con la [L], no estamos redireccionando, simplemente dando lectura a la URL dinámica a partir de la amigable.</p>
<p>Así,</p>
<p>http://www.cherada.com/info/do/contact.html</p>
<p>Utilizaría la antepenúltima linea:</p>
<p>RewriteRule ^([^/]+)/([^/]+)/([^/]+).html$ /index.php?seccion=$1&amp;$2=$3 [L]</p>
<p>Dando como resultado:</p>
<p>^info/do/contact.html -&gt; /index.php?seccion=info&amp;do=contact</p>
<h3>3. Redireccionar las antiguas URLs dinámicas a las nuevas amigables de forma permanente</h3>
<p>Si antes utilizabas únicamente <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span> </span></span></strong></span></p>
<p><strong></p>
<input name="IL_MARKER" type="hidden" />URLs dinámicas</strong> y has decidido cambiar a <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span> </span></span></strong></span></p>
<p><strong><br />
<input name="IL_MARKER" type="hidden" />URLs amigables</strong>, es necesario hacérselo saber a los <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>buscadores</strong></span>. Tendrás pues que establecer en el <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span></p>
<input name="IL_MARKER" type="hidden" />htaccess</span></span></strong></span> que TODAS las antiguas <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span></p>
<input name="IL_MARKER" type="hidden" />URLs</span> dinamicas</span></strong></span> te las redireccione permanentemente a sus respectivas <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>amigables</strong></span>.</p>
<p>Cuando usás el <a href="http://google.com/webmasters" target="_blank"><span style="text-decoration: underline;">Google Webmasters</span></a><span>,</span> una herramienta para controlar la optimización y crecimiento de tu Sitio, te irás dando cuenta del progreso con el que <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>Google</span></span></strong></span> elimina poco a poco tus antiguas <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>URLs</span></span></strong></span><span>. Eso es a través de un trabajo conjunto con el otro <span>archivo</span> obligatorio que debes tener en el root de tu sitio, me refiero a </span><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>robots.txt</strong></span> (leer más al respecto). Básicamente en el <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>robots.txt</strong></span> le decís a <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>Google</span></span></strong></span> (y a todos los buscadores), qué archivos puede indexar, qué carpetas obviar, qué extensiones no considerar, hasta dónde puede leer y si puede o no leer <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>URLs</span> dinámicas</span></strong></span>. Obviamente si estamos haciendo todo esto de cambiar a <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span>URLs</span> amigables</span></strong></span><span> le diremos a los buscadores que ya no indexen <span>URLs</span> dinámicas, osea que después del signo de interrogación &#8220;?&#8221; ya no indexen nada.</span></p>
<p>Acá está cómo hacerlo (nuevamente desde el caso más amplio al más reducido):</p>
<p>#### REDIRECTS PERMANENTES GENERALES ####<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1/%2/%3/%4/%5/%6/%7/%8/%9.html? [R=301,L]<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1/%2/%3/%4/%5/%6/%7/%8.html? [R=301,L]<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1/%2/%3/%4/%5/%6/%7.html? [R=301,L]<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1/%2/%3/%4/%5/%6.html? [R=301,L]<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1/%2/%3/%4/%5.html? [R=301,L]<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)&amp;([^=]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1/%2/%3/%4.html? [R=301,L]<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)&amp;([^=]+)=([^&amp;]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1/%2/%3.html? [R=301,L]<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)&amp;([^=]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1/%2.html? [R=301,L]<br />
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /\?seccion=([^&amp;]+)\ HTTP/<br />
#RewriteRule ^$ http://www.cherada.com/%1.html? [R=301,L]</p>
<p><span> Observa cómo ahora hacemos la operación inversa. La que antes era <span> </span></span></p>
<input name="IL_MARKER" type="hidden" />una URL http://www.cherada.com/?seccion=info&amp;do=contact ahora será http://www.cherada.com/info/do/contact.html. Por otro lado, cuando <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span><span></p>
<input name="IL_MARKER" type="hidden" />Google</span></span></strong></span> se entere, sabrá que por el R=301, le estamos diciendo que se olvide para siempre de la URL dinámica y, en este caso, sí redireccionará automáticamente a la amigable.</p>
<p><!--INFOLINKS_STOP--></p>
<h3>4. Casos particulares de Redireccionamiento</h3>
<p>¿Qué crees que es <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>más óptimo en términos de optimización</strong></span>? Tener una URL como esta: http://www.cherada.com/blogs/do/view/id/3855.html ó una como ésta: http://www.cherada.com/articulos/htaccess-tutorial-seo-5-trucos-para-optimizar-tu-sitio-para-google</p>
<p>Evidentemente la segunda forma es la más óptima. En general estos son los factores que hacen que un artículo sea óptimo para Google:</p>
<p><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>1. Que tenga un buen título</strong></span><br />
<span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>2. Que el Tag  del Head coincida con el título del artículo</strong></span><br />
<span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>3. Que los tags constituyan palabras clave para el META keywords</strong></span><br />
<span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>4. Que el META description coincida con el texto del artículo</strong></span><br />
<span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>5. Que la URL sea parecida al título (además de ser amigable)</strong></span></p>
<p>Por ahí hay otros trucos más como contar con un <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>sitemap.xml para Google</strong></span>, tener un <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Feed RSS</strong></span> con los articulos actualizados a tiempo real, un <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Ping</strong></span> frecuente a los <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>buscadores</strong></span>, y resaltar con negritas las palabras más importantes del artículo.</p>
<p>Hay ciertos trucos que expliqué de los elementos que debe tener la <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>Tabla de Artículos en la Base de Datos de tu Sitio</strong></span>. Veíamos que es necesario que además de un ID tengamos también un campo único para cada fila de <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>article_key</strong></span>. El objetivo de este key es que lleve el nombre del artículo pero omitiendo caracteres especiales, tildes, ñs, etc&#8230; osea, el título crudo y pelado optimizado para URL. En el caso de este artículo el key sería: <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>htaccess-tutorial-seo-5-trucos-para-optimizar-tu-sitio-para-google</strong></span></p>
<p>Existe debate entre qué es mejor si el <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>uso de guion</strong></span> (-) o <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>guion bajo</strong></span> (_) a la hora de generar la URL. A mi me ha servido de maravilla el guion.</p>
<p>Bien, ya con mis keys en la base de datos seré capaz de crear reglas específicas de lectura para URLs super amigables para los artículos:</p>
<p>##### BLOG #####<br />
# articulos/titulo-del-blog/6/#comment-138496<br />
RewriteRule ^articulos/([^/]+)/([^/]+)/(.*)$ /index.php?seccion=blogs&amp;do=view&amp;name=$1&amp;p=$2$3 [L]<br />
# articulos/titulo-del-blog/#comment-138496<br />
RewriteRule ^articulos/([^/]+)/(.*)$ /index.php?seccion=blogs&amp;do=view&amp;name=$1$2 [L]<br />
# articulos/titulo-del-blog<br />
RewriteRule ^articulos/([^/]+)$ /index.php?seccion=blogs&amp;do=view&amp;name=$1 [L]</p>
<p>Lo importante que debes observar es la última regla, que ^articulos/([^/]+)$ te lo lea como ?seccion=blog&amp;do=view&amp;name=$1. En este caso yo le diré a mi archivo PHP que, en lugar de leer las variables del artículo a través del ID, lo haga por medio del article_key, osea desde el $_GET(&#8220;name&#8221;). Las dos reglas que puse encima son previendo si en un futuro el artículo tendrá paginador de comentarios y si llegan al artículo a través de un comentario específico.</p>
<p><span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong><span style="color: #bf0000;"> </span></strong></span><strong>Muy Importante:</strong> Estas reglas especiales deben ir ANTES de las reglas generales en nuestro archivo htaccess. Esto es así porque htaccess lee las líneas en orden y si ya ejecutó una petición particular se detendrá ahí y ya no leerá el resto.</p>
<h3>5. Leer archivos .xml y .txt a partir de archivos PHP</h3>
<p>Existen formas dinámicas de generar <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>archivos RSS</strong></span>, de <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>sitemap.xml</strong></span>, de <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>urllists.txt</strong></span> a partir de <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>PHP</strong></span>. (Leer instrucciones aquí). Una vez creados, debes decirle al htaccess que te lea esas extensiones a partir de los archivos php que te generan el contenido dinámico.</p>
<p>#### XML Y ROBOTS ####<br />
RewriteRule sitemap.xml(.*) sitemap.php$2 [nocase]<br />
RewriteRule index.xml(.*) rss.php$2 [nocase]<br />
RewriteRule urllist.txt(.*) urllist.php$2 [nocase]</p>
<h3>Tips adicionales de Optimización</h3>
<p>Gracias al <a href="http://google.com/webmasters" target="_blank"><span style="text-decoration: underline;">Google Webmasters</span></a> puedes crear un <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>código HTML</strong></span> que te servirá para tener un <span style="font-weight: bold; font-family: Trebuchet MS; font-size: 13px;"><strong>archivo 404.php</strong></span> adecuado para mostrar una página de Error No Encontrado.</p>
<p>Acá la redirección que tendrás que tener:</p>
<p>#### ERROR #####<br />
ErrorDocument 404 /404.php</p>
<p>Este exelente articulo y muchos mas puedes verlos en la web de su autor:</p>
<p><a href="http://www.cherada.com/" target="_blank">www.cherada.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mydesign.com.es/blog/usos-de-htaccess-tutorial-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crear facilmente un archivo .htaccess</title>
		<link>http://www.mydesign.com.es/blog/crear-facilmente-un-archivo-htaccess/</link>
		<comments>http://www.mydesign.com.es/blog/crear-facilmente-un-archivo-htaccess/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 14:43:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Herramientas]]></category>
		<category><![CDATA[Htaccess]]></category>
		<category><![CDATA[programacion web]]></category>

		<guid isPermaLink="false">http://www.mydesign.com.es/blog/?p=53</guid>
		<description><![CDATA[
Navegando la web en investigando nos encontramos con esta genial herramienta GRATUITA, que con seguridad va a ir a parar directamente a los marcadores favoritos de todos los desarrolladores y programadores web, ya que simplifica enormemente la tarea de crear un archivo .htacces generandolo de forma online, siguiendo pasos sencillos y pudiendo seleccionar el idioma [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-54" title="htaccess_editor" src="http://www.mydesign.com.es/blog/wp-content/uploads/2009/10/htaccess_editor.gif" alt="htaccess_editor" width="400" height="60" /></p>
<p>Navegando la web en investigando nos encontramos con esta genial herramienta GRATUITA, que con seguridad va a ir a parar directamente a los marcadores favoritos de todos los desarrolladores y programadores web, ya que simplifica enormemente la tarea de crear un archivo .htacces generandolo de forma online, siguiendo pasos sencillos y pudiendo seleccionar el idioma entre los cuales incluye tambien Español.<span id="more-53"></span></p>
<p>Esta herramienta permite de manera sencilla realizar:</p>
<ul>
<li>Denegacion de acceso</li>
<li>Autenticacion basica</li>
<li>Paginas de error</li>
<li>Configuracion WWW</li>
<li>Directivas de Redireccion</li>
<li>Restricciones de Acceso</li>
</ul>
<p>Podes acceder a esta herramienta desde su web <a href="http://htaccesseditor.com/es.shtml" target="_blank">htaccesseditor.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mydesign.com.es/blog/crear-facilmente-un-archivo-htaccess/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

