
25/07/2013, 08:37
|
 | Moderator Unix/Linux | | Fecha de Ingreso: julio-2013 Ubicación: Odessa (Ukrania)
Mensajes: 3.278
Antigüedad: 11 años, 6 meses Puntos: 401 | |
Respuesta: Eliminar el punto html y punto php Cita:
Iniciado por TIFORO 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 originalRewriteEngine on RewriteCond %(HTTP_HOST) ^tudominio.com RewriteRule (.*) http://www.tudominio.com/$1 [R=301,L] RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.html\ HTTP/ RewriteRule (.*) index\.html$ /$1 [R=301,L] RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.htm\ HTTP/ RewriteRule (.*) index\.htm$ /$1 [R=301,L] RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.php\ HTTP/ 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- |