Página 1 de 1

problema con redirecciones

Publicado: 07 Ene 2014, 09:26
por lazaro
Hola, el foro desde ayer aparece como que tiene muchas redirecciones y no deja loguear a los usuarios, lo he resuelto eliminando del .htaccess la linea:

DirectoryIndex portal.php index.php index.html index.htm

pero el problema es que esa linea me redireccionaba al portal (que es muy importante), ahora cuando entran van directo al indice de foros y necesito que vaya a portal. He probado cambiando el nombre de la cookie por otro, limpiando cache y demas pero no se arregla.

Resumen:
Si pongo la linea de arriba me redirige al portal que es lo que quiero pero los usuarios no se pueden loguear porque les da error de muchas redirecciones.
Si quito la linea si se pueden loguear pero les envia a foros y necesito que les envie a portal.

Escribo aqui el htaccess CON la linea que he quitado (por lo que es el .htaccess que da error)

Código: Seleccionar todo

# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

DirectoryIndex portal.php index.php index.html index.htm

# You may need to un-comment the following lines
# Options +FollowSymlinks
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
# RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
# RewriteCond %{HTTP_HOST} !^www\.hdvagos\.com$ [NC]
# RewriteRule ^(.*)$ http://www.hdvagos.com/$1 [QSA,L,R=301]

# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
#####################################################
# PHPBB SEO REWRITE RULES ALL MODES
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX
# RewriteRule ^forum\.html$ /index.php [QSA,L,NC]
# FORUM ALL MODES
RewriteRule ^(foro|[a-z0-9_-]*-f)([0-9]+)/?(pagina([0-9]+)\.html)?$ /viewforum.php?f=$2&start=$4 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^(foro|[a-z0-9_-]*-f)([0-9]+)/(tema|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^anuncios/(tema|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$2&start=$4 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM ALL MODES
RewriteRule ^([a-z0-9_-]*)/?(tema|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
# PHPBB FILES ALL MODES
RewriteRule ^resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /download/file.php?id=$2&t=$1 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^usuario/([^/]+)/?$ /memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^usuario/([^/]+)/(topics|posts)/?(pagina([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ALL MODES
RewriteRule ^(grupo|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
# POST
RewriteRule ^mensaje([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^temas-activos(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^sin-respuesta(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^nuevos-mensajes(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# UNREAD POSTS
RewriteRule ^no-leidos(-([0-9]+))?\.html$ /search.php?search_id=unreadposts&start=$2 [QSA,L,NC]
# THE TEAM
RewriteRule ^el-equipo\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM ALL MODES (SAME DELIM)
# THESE THREE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/?(pagina([0-9]+)\.html)?$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# FIX RELATIVE PATHS : FILES
RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /$1 [QSA,L,NC,R=301]
# FIX RELATIVE PATHS : IMAGES
RewriteRule ^.+/(styles/.*|images/.*)/$ /$1 [QSA,L,NC,R=301]
# END PHPBB PAGES
#####################################################
muchas gracias

Re: problema con redirecciones

Publicado: 07 Ene 2014, 11:32
por micontre
prueba volver a crear un nuevo .htaccess .

Re: problema con redirecciones

Publicado: 10 Ene 2014, 13:38
por lazaro
gracias micontre, eso lo hice lo primero, en la seccion de SEO crear un nuevo htaccess (pero es igual que el viejo, el mismo codigo) el creado no tiene la linea

DirectoryIndex portal.php index.php index.html index.htm

y funciona bien (los usuarios se pueden loguear), al igual que el viejo tambien, el problema es cuando pongo esa linea en el htaccess viejo o nuevo, que a los users le aparece DEMASIADAS REDIRECCIONES y no los deja entrar.

saludos