Foros del Web » Programando para Internet » PHP »

Web modular + seo

Estas en el tema de Web modular + seo en el foro de PHP en Foros del Web. Hola tengo un sitio Modular como el que muestran en Zona PHP ( http://www.zonaphp.com/creando-webs-modulares/ ) y queria preguntarles si es necesario cambiar mis URL del ...
  #1 (permalink)  
Antiguo 16/10/2008, 00:34
 
Fecha de Ingreso: mayo-2006
Mensajes: 119
Antigüedad: 18 años
Puntos: 0
Exclamación Web modular + seo

Hola tengo un sitio Modular como el que muestran en Zona PHP (http://www.zonaphp.com/creando-webs-modulares/) y queria preguntarles si es necesario cambiar mis URL del tipo www.misitio.com/?mod=seccion a algo mas amigable como www.misitio.com/index/seccion para que google me indexe mejor.

Saldos.
  #2 (permalink)  
Antiguo 16/10/2008, 01:40
Avatar de jerkan  
Fecha de Ingreso: septiembre-2005
Mensajes: 1.607
Antigüedad: 18 años, 7 meses
Puntos: 19
Respuesta: Web modular + seo

Es preferible, sí.

Con el mod_rewrite del Apache, puedes conseguirlo.

Suerte.
  #3 (permalink)  
Antiguo 16/10/2008, 01:43
 
Fecha de Ingreso: mayo-2006
Mensajes: 119
Antigüedad: 18 años
Puntos: 0
Respuesta: Web modular + seo

Hola, como tendria que hacer para que me cambie o me tome todos los links que ya estan hechos? no quiero modificar a mano todos los http://www.sitio.com/?mod=seccion por http://www.sitio.com/index/seccion ya que seria una locura... :)

Saludos
  #4 (permalink)  
Antiguo 16/10/2008, 02:28
Avatar de Deschamps  
Fecha de Ingreso: octubre-2008
Mensajes: 257
Antigüedad: 15 años, 6 meses
Puntos: 8
Respuesta: Web modular + seo

Buenas,

Si no quieres complicarte mucho la vida, puedes usar a modo de ejemplo el código empleado por drupal en sus instalaciones por defecto:

Código:
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
Añadiendo esa sección al .htaccess en el raíz de tu sitio y editándola a conveniencia (fíjate en la "q" que hay por ahí), creo que ya tendrías lo que necesitas.

Un saludo.
  #5 (permalink)  
Antiguo 16/10/2008, 02:44
 
Fecha de Ingreso: mayo-2006
Mensajes: 119
Antigüedad: 18 años
Puntos: 0
Respuesta: Web modular + seo

Muchas gracias, voy a intentar... sino con el Sitemap. son pocas secciones igual.

Abrazo.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:11.