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

Error 403 Forbidden

Estas en el tema de Error 403 Forbidden en el foro de Apache en Foros del Web. Estoy itentado trabajar con URL amigables y tengo el siguiente codigo en mi index.php. Código PHP: <?php session_name ( "url_amigable" ); session_start (); $Server = ...
  #1 (permalink)  
Antiguo 25/10/2009, 14:09
Avatar de mark_ant0n  
Fecha de Ingreso: enero-2009
Ubicación: Comitan, Chiapas mx
Mensajes: 388
Antigüedad: 15 años, 3 meses
Puntos: 6
Error 403 Forbidden

Estoy itentado trabajar con URL amigables y tengo el siguiente codigo en mi index.php.
Código PHP:
<?php
session_name
("url_amigable");
session_start();
$Server=$_SERVER['SERVER_NAME'];
$Script=$_SERVER['PHP_SELF'];
$Variables=$_SERVER['QUERY_STRING'];
if(!empty(
$Variables) && $_SERVER['REQUEST_METHOD']=='GET' && $_SESSION['Listo']!=1){ 
    
$Variable=explode("&",$Variables);
    for(
$i=0;$i<count($Variable);$i++){
        
$Amigable.="/".str_replace("=",",",$Variable[$i]);
    }
    
$Dir=str_replace(".php","",$Script);
    
$URL_AMIGABLE="http://".$Server.$Dir.$Amigable."/";
    
$_SESSION['Listo']=1;
    
header("Location: $URL_AMIGABLE");
    exit;
}
$_URL_BASE="http://".$Server."/pruebas/index.php";
?>
<html>
<head>
<title>URL Amigables</title>
<base href="<? echo "---".$_URL_BASE;?>" target="_top" />
</head>
<body>
  <br />
  P&aacute;gina con 1 variable: <a href="index.php?categoria=monitores">index.php?categoria=monitores</a>
  <br />
</body>
</html>
<?php
switch ($categoria ){ 
    case 
"monitores":
    echo 
"Se supone que debe de entrar aqui?";
    break;

$_SESSION['Listo']=0;
?>
Y este seria mi .httacess. pero me Sale el error 403 You don't have permission to access /pruebas/redirect:/pruebas/index.php.php.php on this server. al dar clic en el link, espero me pueda ayudar,
Código PHP:
Options +FollowSymLinks
RewriteEngine on
Rewriterule 
^(.*)/(.*),(.*)/$ $1.php?$2=$
Ya llevo varios dias con uno y otro metodo e implementar URL amigables.
  #2 (permalink)  
Antiguo 26/10/2009, 10:26
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Respuesta: Error 403 Forbidden

En el tag <base /> (el contenido de $_URL_BASE) no debes poner index.php
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #3 (permalink)  
Antiguo 26/10/2009, 11:32
Avatar de mark_ant0n  
Fecha de Ingreso: enero-2009
Ubicación: Comitan, Chiapas mx
Mensajes: 388
Antigüedad: 15 años, 3 meses
Puntos: 6
Respuesta: Error 403 Forbidden

ok gracias david ya quedo resuelto era eso el problema
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 13:18.