Comunidad de diseño web y desarrollo en internet online

Ayuda: htaccess y php con url amigables

Citar            
MensajeEscrito el 25 Nov 2009 03:30 am
Hola amigos del blog a ver si me pueden ayudar con htaccess. lo que pasa q teno un menu dinamico q se carga desde mysql con php
lo que quiero es q en vez q en la url aparesca el id salga el contenido. en la url se ve asi
http://localhost/WebSite/index.php?secc=1
yo quiero q se vea asi
http://localhost/WebSite/Nombre Seccion/
y si se pone sub seccion
http://localhost/WebSite/Nombre Seccion/Sub Seccion/
y si de esa sub hay potra
http://localhost/WebSite/Nombre Seccion/Sub Seccion/Contenido/
y si hay otra data
http://localhost/WebSite/Nombre Seccion/sub seccion/contenido/distrito/
y asi
espero me ayuden porfa :(

Por gcastilo_2009

16 de clabLevel



 

msie8
Citar            
MensajeEscrito el 25 Nov 2009 09:03 am

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox
Citar            
MensajeEscrito el 29 Nov 2009 12:10 am
hola amigos del foro lo de url amigable lo consegui pero ahora me surge un problema q en mozilla corre perfectamente pero en IE como se dana cuando entro a una tercer nivel se comienza a repetier las secciones algo asi
http://misitio/seccion1/subseccion1/contenido/pagina.html en mozila se ve asi pero en IE
http://misitio/seccion1/subseccion1/seccion1/subseccion1/contenido/pagina.html y cuando vuelvo a entrar se ve asi
http://misitio/seccion1/subseccion1/seccion1/subseccion1/seccion1/subseccion1/contenido/pagina.html
por favor ayudenme q es lo q hago mal.
gracias.
a todos

Por gcastilo_2009

16 de clabLevel



 

msie8
Citar            
MensajeEscrito el 01 Dic 2009 12:19 pm
deberías publicar el contenido de tu .htaccess y el script de comprobacion...

Por joarobles

753 de clabLevel

8 tutoriales

 

Córdoba - Argentina

firefox
Citar            
MensajeEscrito el 02 Dic 2009 03:25 am
ok amigo aqui va mi codigo:
-htaccess
Options +Indexes
Options +FollowSymlinks
RewriteEngine On
RewriteBase /albedriototal/

RewriteRule ^index\.html$ index.php [L,NC]
RewriteRule ^Registrate\.html$ registrate.php [L,NC]
RewriteRule ^Recomendar\.html$ enviaramigo.php [L,NC]
RewriteRule ^Login\.html$ login.php [L,NC]
RewriteRule ^Contactenos\.html$ contacto.php [L,NC]
RewriteRule ^Gracias\.html$ respuestacontacto.php [L,NC]
RewriteRule ^RecordarContrasena\.html$ recordar_password.php [L,NC]
RewriteRule ^RespuestaRecordar\.html$ recordar_password2.php [L,NC]
RewriteRule ^Activar_cuenta\.html$ activar.php [L,NC]
#4 variables
RewriteRule ^(.*)/(.*)/(.*)/(.*)\.html$ categoria.php?secc=$1&cate=$2&scate=$3&dist=$4 [L,NC]
#3 variables
RewriteRule ^(.*)/(.*)/(.*)\.html$ categoria.php?secc=$1&cate=$2&scate=$3 [L,NC]
#2 variables
RewriteRule ^(.*)/(.*)\.html$ categoria.php?secc=$1&cate=$2 [L,NC]
#1 variables
RewriteRule ^(.*)\.html$ seccion.php?secc=$1 [L,NC]

el codigo de la pagina q me da el problema es esta

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
$Server=$_SERVER['SERVER_NAME'];

include("connections/conexion.inc.php");
/*$SubCategoria=$_GET["scate"];
$Categoria= strtoupper($_GET["cate"]);

$Seccion=$_GET["secc"];
$Distrito=$_GET["dist"];*/

//Busqueda de los id segun el nombre
if(isset($_GET["secc"])){
$Sql_Seccion = "SELECT * FROM secciones WHERE sec_text='".$_GET["secc"]."'";
$Cad_Seccion = mysql_query($Sql_Seccion,$conn);

if(mysql_num_rows($Cad_Seccion)) {
$idSeccion= mysql_result($Cad_Seccion,0,"sec_id");
$Seccion=$_GET["secc"];
}
}

if(isset($_GET["cate"])){
$Sql_Categoria = "SELECT * FROM categoria WHERE cat_text='".$_GET["cate"]."' AND seccion_id='".$idSeccion."'";
$Cad_Categoria = mysql_query($Sql_Categoria,$conn);

if(mysql_num_rows($Cad_Categoria)) {
$idCategoria= mysql_result($Cad_Categoria,0,"cat_id");
$Categoria= $_GET["cate"];
}
}


if(isset($_GET["scate"])){
$Sql_sCategoria = "SELECT * FROM sub_categoria WHERE scat_text='".$_GET["scate"]."' AND sec_id='".$idSeccion."' AND cat_id='".$idCategoria."'";
$Cad_sCategoria = mysql_query($Sql_sCategoria,$conn);

if(mysql_num_rows($Cad_sCategoria)) {
$idSubCategoria= mysql_result($Cad_sCategoria,0,"scat_id");
$SubCategoria=$_GET["scate"];
}
}



if(isset($_GET["dist"])){
$Sql_Distrito = "SELECT * FROM distrito WHERE dist_text='".$_GET["dist"]."'";
$Cad_Distrito = mysql_query($Sql_Distrito,$conn);

if(mysql_num_rows($Cad_Distrito)) {
$idDistrito= mysql_result($Cad_Distrito,0,"dist_id");
$Distrito=$_GET["dist"];
}
}else{
$Sql_Distrito = "SELECT * FROM distrito WHERE dist_text='".$_GET["scate"]."'";
$Cad_Distrito = mysql_query($Sql_Distrito,$conn);

if(mysql_num_rows($Cad_Distrito)) {
$idDistrito= mysql_result($Cad_Distrito,0,"dist_id");
$Distrito=$_GET["scate"];
}
}
//Fin de busqueda de id segun el nombre

// echo $idSeccion;
// echo $idCategoria;
// echo $idSubCategoria;
// echo $idDistrito;
// echo "Seccion->".$Seccion."<br/>";
// echo "Categoria->".$Categoria."<br/>";
// echo "SubCategoria->".$SubCategoria."<br/>";
// echo "Distrito->".$Distrito;
// die();
$_URL_BASE="http://".$Server."/albedriototal/";
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>::: Albedrío Total :::</title>
<base href="<? echo $_URL_BASE;?>" target="_top" />
<link href="texto.css" rel="stylesheet" type="text/css" />
<link href="estilos.css" rel="stylesheet" type="text/css" />
<script src="scripts/ajax.js" type="text/javascript"></script>
<script language="JavaScript" type="text/JavaScript">
function EnviarClick(v_idbanner){
id_banner=v_idbanner;
if(id_banner!=""){
ajax=objetoAjax();
ajax.open("POST", "click_banners_seccion.php?id_banner_secc="+id_banner,true);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
}
}
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send('');
}else{
window.location="index.php";
}
}

//-->
</script>
<script type="text/JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
</head>
<body>
<table width="884" border="0" align="center" cellpadding="0" cellspacing="0" background="imag/fondotabla.jpg">
<tr>
<td height="32" colspan="7" align="center" valign="top">
<table width="884" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="52" height="100"><img src="imag/espacio.gif" width="52" height="1" /></td>
<td colspan="3" align="left" valign="middle">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="index.html" target="_parent"><img src="imag/logo.jpg" width="250" height="61" border="0" /></a></td>
<td><div align="right"><a href="Registrate.html" target="_parent" class="linkreg">REGISTRATE y gana</a>&nbsp;&nbsp;<img src="imag/diamond_red.gif" width="9" height="8" /><br />
<br /><a href="Recomendar.html" target="_parent" class="linkreg">&iquest;Te&nbsp;gust&oacute;&nbsp;esta&nbsp;p&aacute;gina?&nbsp;&iexcl;&nbsp;Recomi&eacute;ndala!</a>&nbsp;&nbsp;<img src="imag/diamond_red.gif" width="9" height="8" /></div></td>
</tr>
</table>
</td>
<td width="52"><img src="imag/espacio.gif" width="52" height="1" /></td>
</tr>
<tr>
<td height="4" align="center" valign="top" ></td>
<td height="4" colspan="3" align="center" valign="top" bgcolor="#CCCCCC"></td>
<td height="4" align="center" valign="top"></td>
</tr>
<tr>
<td height="32" align="center" valign="top"></td>
<td height="32" colspan="3" width="780" align="center" valign="top" bgcolor="#000000"><div id="imMnMn">
<?php
$tabla_sec = mysql_query("SELECT * FROM secciones WHERE sec_estado='1' ORDER BY sec_orden") or die('NO SE PUEDE EJECUTAR LA CONSULTA');
$rows_sec = mysql_num_rows($tabla_sec);?>
<div id="imMnMn2">
<ul>
<?php
$x=0;
while($row_sec = mysql_fetch_row($tabla_sec))
{ $x++;
$sec_id= $row_sec[0];
$sec_titulo= $row_sec[1];
$sec_text= $row_sec[2];
?>
<li><a href="./<?=$sec_text?>.html"><?=$sec_titulo?></a>
<?
}
?>
</li>
</ul>
</div>
</div></td>
<td height="32" align="center" valign="top"></td>
</tr>
<tr>
<td height="290" colspan="5" align="center" valign="top"><?php
include("includes/sec_banner_top.php");
?></td>
</tr>
<tr>
<td height="10"></td>
<td rowspan="2" valign="top"><?php
$tabla_sec_cat = mysql_query("SELECT * FROM secciones WHERE sec_id='".$idSeccion."'") or die('NO SE PUEDE EJECUTAR LA CONSULTA');

while($row_sec_cat = mysql_fetch_row($tabla_sec_cat))
{
$idSeccion= $row_sec_cat[0];
$sec_titulo= $row_sec_cat[1];
//$sec_text= $row_sec_cat["sec_text"];
//$sec_tituloimg= $row_sec_cat[2];
}

$tabla_cat = mysql_query("SELECT * FROM categoria WHERE cat_id='". $idCategoria."' AND seccion_id='".$idSeccion."' AND cat_estado='1' ORDER BY cat_id") or die('NO SE PUEDE EJECUTAR LA CONSULTA');


while($row = mysql_fetch_row($tabla_cat))
{
$idCategoria=$row[0];
$idSeccion=$row[1];
$cate_titulo= $row[2];
$cate_columnas= $row[5];
$cate_tituloimg= $row[6];
}
?><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="sTitulo" height="35"><?=$sec_titulo;?></td>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="306" height="35" align="right" class="brojo"><select name="menu1" class="derecha" onchange="MM_jumpMenu('parent',this,0)">
<option value="./<?php echo $Seccion; ?>.html"><?php echo ucfirst(strtolower($sec_titulo)); ?>: Seleccionar Opción</option>
<?php
$cb_cat = mysql_query("SELECT * FROM categoria WHERE seccion_id='".$idSeccion."' AND cat_estado='1' ORDER BY cat_id") or die('NO SE PUEDE EJECUTAR LA CONSULTA');
while ($fila_cat = mysql_fetch_assoc($cb_cat))
{
if ($fila_cat["cat_id"]==$idCategoria){
?>
<option value="./<?php echo $Seccion; ?>/<?php echo $fila_cat["cat_text"]; ?>.html" selected="selected">
<?php echo ucfirst(strtolower($fila_cat["cat_titulo"])); ?>
</option>
<?php
} else{
?>
<option value="./<?php echo $Seccion; ?>/<?php echo $fila_cat["cat_text"]; ?>.html">
<?php echo ucfirst(strtolower($fila_cat["cat_titulo"])); ?>
</option>
<?php
}
}
?>
</select></td>
</tr>
</table></td>
<td width="20" class="brojo"><img src="imag/espacio.gif" width="20" height="1" /></td>
</tr>
</table></td>
<td width="23"></td>
<td width="175"></td>
<td></td>
</tr>
<tr>
<td height="25"></td>
<td></td>
<td rowspan="12" valign="top"><?php
include("includes/sec_banner_right.php");
?></td>
<td></td>
</tr>
<tr>
<td height="18"><img src="imag/espacio.gif" width="1" height="500" /></td>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="100%">
<?php
$cb_scat = mysql_query("SELECT * FROM sub_categoria WHERE cat_id='".$idCategoria."' AND sec_id='".$idSeccion."' AND scat_estado='1' ORDER BY scat_id") or die('NO SE PUEDE EJECUTAR LA CONSULTA');
?>
<tr>
<td height="35" valign="middle" class="izq"><img src="<?php echo $cate_tituloimg;?>" /></td>
<td valign="top">
<?php
if (mysql_num_rows($cb_scat)<> 0) {
?>
<table border="0" cellpadding="0" cellspacing="0" align="right" width="100%">
<tr>
<td height="35" align="right"><select name="menu2" class="derecha" onchange="MM_jumpMenu('parent',this,0)">
<option value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>.html" selected="selected">Seleccionar tipo de <?php echo ucfirst(strtolower($cate_titulo)); ?></option>
<?php
while ($fila_scat = mysql_fetch_assoc($cb_scat))
{
if($fila_scat["scat_id"]==$idSubCategoria){
?>
<option selected="selected" value="./<?php echo $Seccion; ?>/<?php $Categoria; ?>/<?php echo $fila_scat["scat_text"]; ?>.html">
<?php echo $fila_scat["scat_titulo"]; ?>
</option>
<?php
}else{
?>
<option value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>/<?php echo $fila_scat["scat_text"]; ?>.html">
<?php echo $fila_scat["scat_titulo"]; ?>
</option>
<?php
}
}
?>
</select></td>
</tr>
</table>
<?php
}else{
?>
<table border="0" cellpadding="0" cellspacing="0" align="right" width="100%">
<?php
$cb_dist = mysql_query("SELECT * FROM distrito WHERE dist_id IN ( SELECT DISTINCT distrito_id FROM contenido WHERE categoria_id='".$idCategoria."' AND seccion_id='".$idSeccion."') ORDER BY dist_titulo ") or die('NO SE PUEDE EJECUTAR LA CONSULTA');
?>
<tr>
<td height="35" align="right">
<?
$tb_contendo= mysql_query("SELECT * FROM contenido WHERE categoria_id='".$idCategoria."' AND seccion_id='".$idSeccion."'".$cr_est_cont.$cr_distrito) or die('NO SE PUEDE EJECUTAR LA CONSULTA');
$tb_contenido_row=mysql_num_rows($tb_contendo);
if($tb_contenido_row!=0){
?>

<select name="menu2" class="derecha" onchange="MM_jumpMenu('parent',this,0)">
<option value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>.html" selected="selected">Seleccionar Distrito</option>
<?php
while ($fila_dist = mysql_fetch_assoc($cb_dist))
{
if($fila_dist["dist_id"]==$idDistrito){
?>
<option selected="selected" value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>/<?php echo $fila_dist["dist_text"]; ?>.html">
<?php echo $fila_dist["dist_titulo"]; ?>
</option>
<?php
}else{
?>
<option value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>/<?php echo $fila_dist["dist_text"]; ?>.html">
<?php echo $fila_dist["dist_titulo"]; ?>
</option>
<?php
}
}
?>
</select>
<?php
}
?>
</td>
</tr>
</table>
<?php
}
?> </td>
<td width="20"><img src="imag/espacio.gif" width="20" height="1" /></td>
</tr>
</table>
<div class="sBorde">
<?php
if($SubCategoria==""){
?>
<table border="0" cellpadding="0" cellspacing="0">
<?php

if($Distrito!=""){
$cr_distrito=" AND distrito_id='".$idDistrito."'";
}else{
$cr_est_cont=" AND content_estado='1'";
}
$tb_contendo = mysql_query("SELECT * FROM contenido WHERE categoria_id='".$idCategoria."' AND seccion_id='".$idSeccion."'".$cr_est_cont.$cr_distrito) or die('NO SE PUEDE EJECUTAR LA CONSULTA');
$tb_contenido_row=mysql_num_rows($tb_contendo);
if($tb_contenido_row==0){
?>
<tr>
<td height="177"><img src="imag/espacio.gif" width="18" height="1" /></td>
<td valign="middle" class="sDetalle"><strong>No existe a&uacute;n informaci&oacute;n. </strong><br />
Si desea enviarnos informaci&oacute;n, escribanos haciendo <a href="Contactenos.html" target="_parent" class="linkrojo">click aqu&iacute;. </a>
</td>
<td align="left" valign="middle">&nbsp;</td>
</tr>

<tr>
<td height="30" colspan="5" align="center" valign="top"><img src="imag/linea.gif" width="545" height="30" /></td>
</tr>
<?
}else{
while($row_cont = mysql_fetch_row($tb_contendo))
{
//$cont_colum= $row_cont[1];
$cont_titulo= $row_cont[4];
$cont_descrip= $row_cont[5];
$cont_text= $row_cont[6];
$cont_foto= $row_cont[7];

if($cate_columnas==1){
?>
<tr>
<td ><img src="imag/espacio.gif" width="18" height="1" /></td>
<td valign="top" class="sDetalle izq">
<div class="sNombre"><?=$cont_titulo?></div>
<?=$cont_descrip?>
<?=$cont_text?><br/>
</td>
<td colspan="2" align="left" valign="middle"><div align="left"><img src="<?=$cont_foto?>" /></div></td>
</tr>
<tr>
<td height="30" colspan="5" align="center" valign="top"><img src="imag/linea.gif" width="545" height="30" /></td>
</tr>
<?
}else{
?>
<tr>
<td width="16" height="15"></td>
<td width="374" rowspan="3" valign="top"><p class="derecha"><strong><br />
</strong><img src="<?=$cont_foto?>" /></p>
<p class="derecha"><strong><span class="Estilo2"><?=$cont_titulo?></span><br /></strong>
<br />
<?=$cont_descrip?></p>
</td>
<td width="188"></td>
</tr>
<tr>
<td height="557"><img src="imag/espacio.gif" width="18" height="1" /></td>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="31" rowspan="14" valign="top"><table width="135%" border="0" cellpadding="0" cellspacing="0" background="../imag/lineavertical.gif">
<!--DWLayoutTable-->
<tr>
<td width="36" height="557">&nbsp;</td>
</tr>
</table></td>
<td height="32" colspan="2" valign="top"><strong><span class="Estilo2">EN ESCENA </span></strong></td>
<td width="14" rowspan="13" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="12" height="330">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td width="11" height="11" valign="top">&nbsp;</td>
<td width="97" rowspan="12" valign="top" class="derecha">
<?=$cont_text?>
</td>
</tr>
<tr>
<td height="146">&nbsp;</td>
</tr>
</table>

</td>
</tr>
<?
}
}
}
?>
</table><?php
}else{
?><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td ><img src="imag/espacio.gif" width="18" height="1" /></td>
<?php
$tb_scat = mysql_query("SELECT * FROM sub_categoria WHERE scat_id='".$idSubCategoria."' AND cat_id='".$idCategoria."' AND sec_id='".$idSeccion."' AND scat_estado='1' ORDER BY scat_id") or die('NO SE PUEDE EJECUTAR LA CONSULTA');

while($row_scat = mysql_fetch_row($tb_scat))
{
$scat_titulo= $row_scat[3];
}
?>
<td align="left" valign="middle" style="line-height:30px; font-weight:bold" width="100%"><?=$scat_titulo?>
<?php if($Distrito!=""){
$dist_muestra = mysql_query("SELECT * FROM distrito WHERE dist_id='".$idDistrito."' ORDER BY dist_titulo ") or die('NO SE PUEDE EJECUTAR LA CONSULTA');
while ($fila_dist_muestra = mysql_fetch_assoc($dist_muestra)){
$Distrito_Elegido=$fila_dist_muestra["dist_titulo"];
}
echo "<br/> / ".$Distrito_Elegido;
}
?></td>
<?php
$cb_dist = mysql_query("SELECT * FROM distrito WHERE dist_id IN ( SELECT DISTINCT distrito_id FROM contenido WHERE scategoria_id='".$idSubCategoria."' AND categoria_id='".$idCategoria."' AND seccion_id='".$idSeccion."') ORDER BY dist_titulo ") or die('NO SE PUEDE EJECUTAR LA CONSULTA');
?>
<td align="right" valign="middle">
<?
$tb_contendo_ = mysql_query("SELECT * FROM contenido WHERE scategoria_id='".$idSubCategoria."' AND categoria_id='".$idCategoria."' AND seccion_id='".$idSeccion."'".$cr_est_cont.$cr_distrito) or die('NO SE PUEDE EJECUTAR LA CONSULTA');
$tb_contenido_row_=mysql_num_rows($tb_contendo_);
if($tb_contenido_row_!=0){
?>
<select name="menu3" class="derecha" onchange="MM_jumpMenu('parent',this,0)">
<option value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>/<?php echo $SubCategoria; ?>/<?php echo $fila_dist["dist_text"]; ?>.html" selected="selected">Seleccione Distrito</option>
<?php
while ($fila_dist = mysql_fetch_assoc($cb_dist))
{
if($idDistrito==$fila_dist["dist_id"]){
?>
<option selected="selected" value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>/<?php echo $SubCategoria; ?>/<?php echo $fila_dist["dist_text"]; ?>.html">
<?php echo $fila_dist["dist_titulo"]; ?>
</option>
<?php
}else{
?>
<option value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>/<?php echo $SubCategoria; ?>/<?php echo $fila_dist["dist_text"]; ?>.html">
<?php echo $fila_dist["dist_titulo"]; ?>
</option>
<?php
}
}
?>
</select>
<?
}
?>
</td>
<td width="20"><img src="imag/espacio.gif" width="20" height="1" /></td>
</tr>
<tr>
<?php
if($Distrito!=""){
$cr_distrito=" AND distrito_id='".$idDistrito."'";
}else{
$cr_est_cont=" AND content_estado='1'";
}
$tb_contendo = mysql_query("SELECT * FROM contenido WHERE scategoria_id='".$idSubCategoria."' AND categoria_id='".$idCategoria."' AND seccion_id='".$idSeccion."'".$cr_est_cont.$cr_distrito) or die('NO SE PUEDE EJECUTAR LA CONSULTA');
$tb_contenido_row=mysql_num_rows($tb_contendo);
if($tb_contenido_row==0){
?>
<tr>
<td height="177">&nbsp;</td>
<td class="sDetalle izq">
<?php
if($tb_contenido_row_!=0){
?>
<strong>No existe a&uacute;n informaci&oacute;n en este distrito.</strong><br />
<?php
}else{
?>
<strong>No existe a&uacute;n informaci&oacute;n.</strong><br />
<?php
}
?>
Si&nbsp;desea&nbsp;enviarnos&nbsp;informaci&oacute;n,&nbsp;escribanos&nbsp;haciendo&nbsp;<a href="Contactenos.html" target="_parent" class="linkrojo">click&nbsp;aqu&iacute;.</a>
</td>
<td align="left" valign="middle"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td></td>
</tr>
<tr>
<td height="30" colspan="5" align="center"><img src="imag/linea.gif" width="545" height="30" /></td>
</tr>
<?
}else{
while($row_cont = mysql_fetch_row($tb_contendo))
{
//$cont_colum= $row_cont[1];
$cont_titulo= $row_cont[4];
$cont_descrip= $row_cont[5];
$cont_text= $row_cont[6];
$cont_foto= $row_cont[7];

if($cate_columnas==1){
?>
<tr>
<td ><img src="imag/espacio.gif" width="18" height="1" /></td>
<td valign="top" class="sDetalle izq">
<div class="sNombre"><?=$cont_titulo?></div>
<?=$cont_descrip?>
<?=$cont_text?><br/>
</td>
<td align="left" valign="middle" colspan="2"><div align="left"><img src="<?=$cont_foto?>" /></div></td>
</tr>
<tr>
<td height="30" colspan="5" align="center" valign="top"><img src="imag/linea.gif" width="545" height="30" /></td>
</tr>
<?
}else{
?>
<td width="16" height="15"></td>
<td width="374" rowspan="3" valign="top"><p class="derecha"><strong><br />
</strong><img src="<?=$cont_foto?>" /></p>
<p class="derecha"><strong><span class="Estilo2"><?=$cont_titulo?></span><br /></strong>
<br />
<?=$cont_descrip?></p>
</td>
<td width="188"></td>
</tr>
<tr>
<td height="557"><img src="imag/espacio.gif" width="18" height="1" /></td>
<td valign="top">
<?=$cont_text?>
</td>
</tr>
<?
}
}
}
?>
</table>
<?php
}
?></div>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
<?
include("includes/footer.php");
?>
</table>
</body>
</html>
<?
echo "Seccion->".$Seccion."<br/>";
echo "Categoria->".$Categoria."<br/>";
echo "SubCategoria->".$SubCategoria."<br/>";
echo "Distrito->".$Distrito;
?>
no se q sera lo que hago mal espero me ayuden porfa.
gracias de ante mano.
hasta la proxima

Por gcastilo_2009

16 de clabLevel



 

msie8
Citar            
MensajeEscrito el 02 Dic 2009 03:26 am
ah el segungo codigo q esta ah es la pagina categoia.php

Por gcastilo_2009

16 de clabLevel



 

msie8
Citar            
MensajeEscrito el 02 Dic 2009 03:34 am
hola gcastilo_2009, por favor, para que podamos ayudarte, respeta las reglas de estilo del foro. Postea tus codigos dentro de la etiqueta correspondiente y no pretendas q NADIE lea 3 paginas de codigo completo, abstrae el problema y coloca solo la informacion necesaria para analizarlo...
saludos

Por joarobles

753 de clabLevel

8 tutoriales

 

Córdoba - Argentina

firefox
Citar            
MensajeEscrito el 02 Dic 2009 03:39 am
ok amigo voy a poner de nuevo el codigo

Por gcastilo_2009

16 de clabLevel



 

msie8
Citar            
MensajeEscrito el 02 Dic 2009 03:40 am
Options +Indexes
Options +FollowSymlinks
RewriteEngine On
RewriteBase /albedriototal/

RewriteRule ^index\.html$ index.php [L,NC]
RewriteRule ^Registrate\.html$ registrate.php [L,NC]
RewriteRule ^Recomendar\.html$ enviaramigo.php [L,NC]
RewriteRule ^Login\.html$ login.php [L,NC]
RewriteRule ^Contactenos\.html$ contacto.php [L,NC]
RewriteRule ^Gracias\.html$ respuestacontacto.php [L,NC]
RewriteRule ^RecordarContrasena\.html$ recordar_password.php [L,NC]
RewriteRule ^RespuestaRecordar\.html$ recordar_password2.php [L,NC]
RewriteRule ^Activar_cuenta\.html$ activar.php [L,NC]
#4 variables
RewriteRule ^(.*)/(.*)/(.*)/(.*)\.html$ categoria.php?secc=$1&cate=$2&scate=$3&dist=$4 [L,NC]
#3 variables
RewriteRule ^(.*)/(.*)/(.*)\.html$ categoria.php?secc=$1&cate=$2&scate=$3 [L,NC]
#2 variables
RewriteRule ^(.*)/(.*)\.html$ categoria.php?secc=$1&cate=$2 [L,NC]
#1 variables
RewriteRule ^(.*)\.html$ seccion.php?secc=$1 [L,NC]

Por gcastilo_2009

16 de clabLevel



 

msie8
Citar            
MensajeEscrito el 02 Dic 2009 03:42 am
uso esta funcion javascript para llamar a la pagina en los combos
<script type="text/JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>

y en el combo tengo este codigo dependiendo de lo q muestro

<select name="menu2" class="derecha" onchange="MM_jumpMenu('parent',this,0)">
<option value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>.html" selected="selected">Seleccionar tipo de <?php echo ucfirst(strtolower($cate_titulo)); ?></option>
<?php
while ($fila_scat = mysql_fetch_assoc($cb_scat))
{
if($fila_scat["scat_id"]==$idSubCategoria){
?>
<option selected="selected" value="./<?php echo $Seccion; ?>/<?php $Categoria; ?>/<?php echo $fila_scat["scat_text"]; ?>.html">
<?php echo $fila_scat["scat_titulo"]; ?>
</option>
<?php
}else{
?>
<option value="./<?php echo $Seccion; ?>/<?php echo $Categoria; ?>/<?php echo $fila_scat["scat_text"]; ?>.html">
<?php echo $fila_scat["scat_titulo"]; ?>
</option>
<?php
}
}
?>
</select>

y como esta en los post anteriores en el mozilla corre perfectamente pero en IE me da problemas
espero su ayuda

Por gcastilo_2009

16 de clabLevel



 

msie8
Citar            
MensajeEscrito el 02 Dic 2009 04:32 am
En serio... No es jodido usar la etiqueta [code], [php] o [js]

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox
Citar            
MensajeEscrito el 02 Dic 2009 04:59 am
pero amigo no se de q me hablan ahi pongoel codigo pero nadie me ayuda com puedo hacer

Por gcastilo_2009

16 de clabLevel



 

msie8
Citar            
MensajeEscrito el 02 Dic 2009 12:56 pm
y si pruebas con un .htaccess como este y luego procesas la entrada en el index.php? Mas o menos asi hacen sistemas como Wordpress...

Código :

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

y desde el index.php obtenes los valores pasados por URL que no llevaron a un archivo existente para procesarlo:

Código PHP :

$cadena = explode('/', $_SERVER['REQUEST_URI']);

Es muy importante que, si usas este método, impongas una condición de error para redireccionar a un 404 en el caso de que el recurso solicitado no este disponible...

Por joarobles

753 de clabLevel

8 tutoriales

 

Córdoba - Argentina

firefox
Citar            
MensajeEscrito el 12 Dic 2009 06:07 pm
Bueno gracias a todos por la ayuda logre solucionarlo

Por gcastilo_2009

16 de clabLevel



 

msie8

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.