Foros del Web » Administración de Sistemas » Apache »

Problema con mi .htaccess

Estas en el tema de Problema con mi .htaccess en el foro de Apache en Foros del Web. Buenas tardes, mi problema es que tengo una web y hará cosa de dos meses que cambie de servidor, y ahora mi .htaccess me da ...
  #1 (permalink)  
Antiguo 24/04/2010, 05:56
 
Fecha de Ingreso: octubre-2008
Mensajes: 16
Antigüedad: 15 años, 6 meses
Puntos: 0
Problema con mi .htaccess

Buenas tardes, mi problema es que tengo una web y hará cosa de dos meses que cambie de servidor, y ahora mi .htaccess me da problemas, no consigo que funcionen las urls del header de mi web...

Antes en el otro servidor, que me iva perfectamente, lo tenía así:

Código PHP:
IndexIgnore *
Options +FollowSymLinks
RewriteEngine On

rewritecond 
%{HTTP_HOST} ^masque2t.com [nc]
rewriterule ^(.*)$ http://www.masque2t.com/$1 [r=301,nc]

RewriteCond %{REQUEST_FILENAME} !-d
ReWriteRule 
^([a-z_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)$ /masque2t_final/$1/$2/$3/$4/$5/$6/$7/ [R=301,L]
ReWriteRule ^([a-z_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)$ /masque2t_final/$1/$2/$3/$4/$5/ [R=301,L]
ReWriteRule ^([a-z_-]+)/([0-9]+)/([a-z0-9-]+)$ /masque2t_final/$1/$2/$3/ [R=301,L]
ReWriteRule ^([a-z_-]+)/([0-9]+)$ /masque2t_final/$1/$2/ [R=301,L]
ReWriteRule ^([a-z_-]+)/([a-z0-9-]+)$ /masque2t_final/$1/$2/ [R=301,L]
ReWriteRule ^([a-z_-]+)$ /masque2t_final/$1/ [R=301,L]

ReWriteRule ^usuario/([0-9]+)/([a-zA-Z0-9_-]+)/$ foro/index.php?action=profile;u=$1
ReWriteRule 
^rss/([a-zA-Z]+)/$ rss.php?type=$1
ReWriteRule 
^([a-z_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/$ $1.php?$2=$3&$4=$5&$6=$7
ReWriteRule 
^([a-z_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/$ $1.php?$2=$3&$4=$5
ReWriteRule 
^([a-z_-]+)/([0-9]+)/([a-z0-9-]+)/$ $1.php?id=$2&title=$3
ReWriteRule 
^([a-z_-]+)/([0-9]+)/$ $1.php?id=$2
ReWriteRule 
^([a-z_-]+)/([a-z0-9-]+)/$ $1.php?title=$2
ReWriteRule 
^([a-z_-]+)/$ $1.php

## ReWriteRule ^eventos/([0-9]+)/([a-z0-9-]+)/$ eventos.php?id=$1&title=$2
##ReWriteRule ^eventos/([a-z0-9-]+)/$ eventos.php?title=$1
##ReWriteRule ^eventos/([0-9]+)/$ eventos.php?id=$1
##ReWriteRule ^videos/([0-9]+)/([a-z0-9-]+)/$ videos.php?id=$1&title=$2
##ReWriteRule ^videos/([a-z0-9-]+)/$ videos.php?title=$1
##ReWriteRule ^videos/([0-9]+)/$ videos.php?id=$1
##ReWriteRule ^imagenes/([0-9]+)/([a-z0-9-]+)/$ imagenes.php?id=$1&title=$2
##ReWriteRule ^imagenes/([a-z0-9-]+)/$ imagenes.php?title=$1
##ReWriteRule ^imagenes/([0-9]+)/$ imagenes.php?id=$1

RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Bot mailto:craftbot@yahoo.com [OR] 
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR] 
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Download Demon [OR] 
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR] 
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR] 
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR] 
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Express WebPictures [OR] 
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR] 
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR] 
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR] 
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR] 
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR] 
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR] 
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR] 
RewriteCond %{HTTP_USER_AGENTHTTrack [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^Image Stripper [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Image Sucker [OR] 
RewriteCond %{HTTP_USER_AGENTIndy Library [NC,OR] 
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Internet Ninja [OR] 
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR] 
RewriteCond %{HTTP_USER_AGENT} ^JOC Web Spider [OR] 
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR] 
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Mass Downloader [OR] 
RewriteCond %{HTTP_USER_AGENT} ^MIDown tool [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Mister PiX [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR] 
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Net Vampire [OR] 
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Offline Explorer [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Offline Navigator [OR] 
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Papa Foto [OR] 
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR] 
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR] 
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR] 
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR] 
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR] 
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR] 
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR] 
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR] 
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Teleport Pro [OR] 
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Web Image Collector [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Web Sucker [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebGo IS [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Website eXtractor [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Website Quester [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR] 
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Xaldon WebSpider [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Zeus 
RewriteRule 
^.* - [F,L]
<
Files .htaccess>
order allow,deny
deny from all
</Files>

# Add Expires Header
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image
/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
</IfModule>
 
# Compress CSS files
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain text/html text/xml application/rss+xml application/atom_xml
AddOutputFilterByType DEFLATE text
/css application/javascript
</IfModule>
 
# ETag only use file time and size, but no inode
FileETag MTime Size 
Pero en este servidor, asi tal cual no me iva me daba error 500 por culpa del .htaccess y tube que quitar las dos primeras lineas para que no me fuera pero claro, las rutas /noticias/ , /eventos/ , /imagenes/ y /videos/ no me las coje y me dice que no se encuentran.

Ahora mismo lo tengo así, mismo que el de arriba, pero sin las dos primeras lineas...

Código PHP:
RewriteEngine On

rewritecond 
%{HTTP_HOST} ^masque2t.com [nc]
rewriterule ^(.*)$ http://www.masque2t.com/$1 [r=301,nc]

RewriteCond %{REQUEST_FILENAME} !-d
ReWriteRule 
^([a-z_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)$ /masque2t_final/$1/$2/$3/$4/$5/$6/$7/ [R=301,L]
ReWriteRule ^([a-z_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)/([a-z0-9_-]+)$ /masque2t_final/$1/$2/$3/$4/$5/ [R=301,L]
ReWriteRule ^([a-z_-]+)/([0-9]+)/([a-z0-9-]+)$ /masque2t_final/$1/$2/$3/ [R=301,L]
ReWriteRule ^([a-z_-]+)/([0-9]+)$ /masque2t_final/$1/$2/ [R=301,L]
ReWriteRule ^([a-z_-]+)/([a-z0-9-]+)$ /masque2t_final/$1/$2/ [R=301,L]
ReWriteRule ^([a-z_-]+)$ /masque2t_final/$1/ [R=301,L]

..... 
La web es http://www.masque2t.com

No entiendo porque no me funciona, si en el otro servidor iva perfecto y en este me va todo bien menos eso...llevo como un mes dandole vueltas y nada... ¿Alguien me puede ayudar? Gracias

Última edición por aroca46; 24/04/2010 a las 08:24
  #2 (permalink)  
Antiguo 24/04/2010, 15:53
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Tema movido desde PHP a Apache

Etiquetas: htaccess
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

SíEste tema le ha gustado a 2 personas




La zona horaria es GMT -6. Ahora son las 18:22.