Jump to content
Fórum Script Brasil
  • 0

ajuda para entender oque pode estar aconetecendo aqui nessa url


naldo_10

Question

echo'<li><a title="'.$catMenu['nome'].' | '.SITENAME.'"href="'.BASE.'/categoria/'.$catMenu['url'].'">'.$catMenu['nome'].'</a>';
exemplo: http://localhost/cursos/prophp/projeto/cat.../entretenimento aparece a url certinho mas fala assim: A URL solicitada / cursos / prophp / projeto / categoria / Entretenimento no se encontró en este servidor. pagina que recebe a url codigo abaixo :
<?php 
$catUrl = mysql_real_escape_string($url[1]);
$readCat = read('up_cat',"WHERE url = '$catUrl'");
if(!$readCat){
    header('Location: '.BASE.'/404' );
}else
foreach($readCat as $cat);
setViews($cat['id']);
?>

<title><?php echo $cat['nome'].' | '.SITENAME;?></title>
<meta name="title" content="<?php echo SITENAME.' | '.$cat['nome'];?>" />
<meta name="description" content="<?php echo $art['content'];?> " />
<meta name="keywords" content="PALAVRAS CHAVE DA PÁGINA" />
<meta name="author" content="AUTOR DO SITE" />   
<meta name="url" content="<?php echo BASE.'/categoria/'.$cat['url'];?>" />  
<meta name="language" content="pt-br" /> 
<meta name="robots" content="INDEX,FOLLOW" /> 

</head>
<body>

<div id="site">

<?php setArq('tpl/header'); ?>

<div id="content">

<div class="categoria">
  <h1 ><?php echo $cat['nome'];?></h1>
       
<?php
echo'<ul class="arts">';
$pag = (empty($url[3]) ? '1' : $url[3]);
$maximo = 6;
$inicio = ($pag * $maximo) - $maximo;
        
        
        if($cat['id_pai'] != ''){
            $readArtigos = read('up_posts',"WHERE categoria = '$cat[id]' AND tipo = 'post' AND status = '1' ORDER BY data DESC LIMIT $inicio, $maximo");
        }else{
            $readArtigos = read('up_posts',"WHERE cat_pai = '$cat[id]'  AND tipo  = 'post' AND status = '1' ORDER BY data DESC LIMIT $inicio, $maximo");
        }
         foreach($readArtigos as $art):
         $catcon++;
echo'<li';
if($gbnum%4==0) echo ' class="last"';
echo'>';
 getThumb($art['img'], $art['tags'], $art['titulo'], '200','150','','',BASE.'/artigo/'.$art['url']);
echo' <p class="data"> '.date('d/m/Y :i',strtotime($art['data'])).'</p>';
echo' <p class="titulo"><a title="ver mais '.$art['titulo'].'" href="'.BASE.'/artigo/'.$art['url'].'" class="link">'.lmWord($art['titulo'],50).'</a></p>';
echo'</li>';
endforeach;
echo'</ul>';

$link = BASE.'/categoria/'.$cat['url'].'/page/';
    if($cat['id_pai'] != ''){
    readPaginator('up_posts',"WHERE categoria = '$cat[id]'  AND tipo  = 'post' AND status = '1' ORDER BY data DESC ", $maximo, $link, $pag,'870px');
    
    }else{
        readPaginator('up_posts',"WHERE cat_pai = '$cat[id]'  AND tipo  = 'post' AND status = '1' ORDER BY data DESC ", $maximo, $link, $pag,'870px');
    }

?>

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Isto é uma URL amigável? Se sim como está o htaccess?

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f

RewriteCond %{SCRIPT_FILENAME} !-d

RewriteRule ^(.*)$ index.php?url=$1

Mas tipo se eu colocar ele da essse erro:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...