🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #748

Re: htaccess y php

#748
From: RobertoCL
Date: Sat, 20 Oct 2007 04:03
53 lines
2667 bytes
"Alexis Araya" <aaraya@gmail.com> escribi� en el mensaje 
news:1192818762.124295.212810@z24g2000prh.googlegroups.com...
On 19 oct, 11:31, "Jos� Miguel Santib��ez" <jms.nos...@nivel5.cl>
wrote:
> En el cap�tulo anterior (news:1192799923.706969.276040
> @i13g2000prf.googlegroups.com), Alexis Araya <aar...@gmail.com> dijo:
>
> > Hola,
>
> > tengo una aplicacion q dentro tiene paginas html basicas..
> > necesito hacer que si la persona no esta logeada(via sesion php), no
> > pueda a entrar a estos direcctorios
> > donde estan las paginas html, para las paginas php no hay problemas pq
> > valido la sesion,
> > pero nose como hacerlo con las que no son php.
>
> > De ante mano, muchas gracias.
>
> La forma m�s simple, es transformarlas en .php e incluir como primera
> l�nea, el c�digo de verificaci�n...
>
> --
> Apoye a la campa�a de alfabetizaci�n y  |       Jose M. Santiba�ez A.
> ordenaci�n de las news, cada post en su |          <j...@nivel5.cl>
> lugar y el lugar exacto para cada post  |        <http://caos.cl/jms>
>
>El Problemas, es q son mas de 300 pgs..

--
te afecta a links est�ticos?

Otra alternativa es un .htaccess que denege todo acceso a .html
<Files *.html>
    Order allow,deny
    Deny from all
</Files>

y todos los html son llamado por un manejador php

manejador.php?pageContentInc=mipagina.html
<?php
//session stuff

    if(file_exists($pageContentInc)){
        require_once $pageContentInc;
    }else{
        $pageContentInc = "common/content_404.inc";
        require_once $pageContentInc;
    }
?>

--
RCL
Technical Details
Message-ID: <ffbr5f$3tv$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
References: <1192799923.706969.276040@i13g2000prf.googlegroups.com> <Xns99CE7158AE02Ajmsnews@201.238.250.229> <1192818762.124295.212810@z24g2000prh.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,6a8d43b81ff4a004
X-Google-Attributes: gid1593cb,public,usenet
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
From: "RobertoCL" <rcl2020NOSPAM@hotmail.com>
Newsgroups: chile.comp.programacion
Subject: Re: htaccess y php
Date: Sat, 20 Oct 2007 00:03:23 -0400
Organization: Varios
Lines: 58
Message-ID: <ffbr5f$3tv$1@news.nivel5.cl>
References: <1192799923.706969.276040@i13g2000prf.googlegroups.com>   <Xns99CE7158AE02Ajmsnews@201.238.250.229> <1192818762.124295.212810@z24g2000prh.googlegroups.com>
NNTP-Posting-Host: pc-146-86-104-200.cm.vtr.net
X-Trace: news.nivel5.cl 1192849392 4031 200.104.86.146 (20 Oct 2007 03:03:12 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Sat, 20 Oct 2007 03:03:12 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original