Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/07/2013, 08:37
Avatar de lauser
lauser
Moderator Unix/Linux
 
Fecha de Ingreso: julio-2013
Ubicación: Odessa (Ukrania)
Mensajes: 3.278
Antigüedad: 10 años, 9 meses
Puntos: 401
Respuesta: Eliminar el punto html y punto php

Cita:
Iniciado por TIFORO Ver Mensaje
He estado probando este codigo y funciona en el arcivo de htaccess:

Código HTML:
RewriteEngine on
     
     RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
     RewriteRule ^index\.html$ http://www.ect.com/ [R=301,L]
     RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.htm\ HTTP/
     RewriteRule ^index\.htm$ http://www.ect.com/ [R=301,L]
     RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
     RewriteRule ^index\.php$ http://www.ect/ [R=301,L]
Lo que hace este codigo es cuando introducimos la url por ejemplo: [url]www.ect.com/index.php[/url], [url]www.ect.com/index.html[/url] lo redicciona a [url]www.ect.com[/url], pero solo funciona con el navegador Mozilla Firefox el resto de navegadores por ejemplo como Opera, Internet Explorer o Safari no funciona de la misma manera me podeis ayudar.

Saludos.
Prueba asi,,,
Código HTML:
Ver original
  1. RewriteEngine on
  2. RewriteCond %(HTTP_HOST) ^tudominio.com
  3. RewriteRule (.*) http://www.tudominio.com/$1 [R=301,L]
  4. RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.html\ HTTP/
  5. RewriteRule (.*) index\.html$ /$1 [R=301,L]
  6. RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.htm\ HTTP/
  7. RewriteRule (.*) index\.htm$ /$1 [R=301,L]
  8. RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.php\ HTTP/
  9. RewriteRule (.*) index\.php$ /$1 [R=301,L]
__________________
Los usuarios que te responden, lo hacen altruistamente y sin ánimo de lucro con el único fin de ayudarte. Se paciente y agradecido.
-SOLOLINUX-