Denying Public Access to Smarty Templates?

This is a discussion on Denying Public Access to Smarty Templates? within the PHP Language forums, part of the PHP Programming Forums category; Is there any way to deny public access to the smarty TPL files? I checked my site and currently anyone ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-27-2007
2good2b@gmail.com
 
Posts: n/a
Default Denying Public Access to Smarty Templates?

Is there any way to deny public access to the smarty TPL files?
I checked my site and currently anyone can enter view the source of
the TPL files by just surfing there.
When I'm trying to change privileges the smarty system stops working

I've been told the templates can possibly be moved to a directory not
in www, is it possible?

Thank you

Reply With Quote
  #2 (permalink)  
Old 05-27-2007
Edward Z. Yang
 
Posts: n/a
Default Re: Denying Public Access to Smarty Templates?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

2good2b@gmail.com wrote:
> Is there any way to deny public access to the smarty TPL files?
> I checked my site and currently anyone can enter view the source of
> the TPL files by just surfing there.
> When I'm trying to change privileges the smarty system stops working
>
> I've been told the templates can possibly be moved to a directory not
> in www, is it possible?


There's an umber of ways you can go about doing this:

1. Add an .htaccess file that denies access to *.tpl files.

2. Move the template files outside of the web root, which is the folder
that gets displayed when you browse to http://www.example.com/

- --
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <htmlpurifier.org> Anti-XSS HTML Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGWaFFqTO+fYacSNoRAoJEAJ9VcMPpjvCs5IyBDPe2FV qrZPi/uACffuWj
hmDBhWNQ3s3GGxgVMZnJpWo=
=w2Sw
-----END PGP SIGNATURE-----
Reply With Quote
  #3 (permalink)  
Old 05-28-2007
2good2b@gmail.com
 
Posts: n/a
Default Re: Denying Public Access to Smarty Templates?

On May 27, 5:18 pm, "Edward Z. Yang" <edwardzy...@thewritingpot.com>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 2goo...@gmail.com wrote:
> > Is there any way to deny public access to the smarty TPL files?
> > I checked my site and currently anyone can enter view the source of
> > the TPL files by just surfing there.
> > When I'm trying to change privileges the smarty system stops working

>
> > I've been told the templates can possibly be moved to a directory not
> > in www, is it possible?

>
> There's an umber of ways you can go about doing this:
>
> 1. Add an .htaccess file that denies access to *.tpl files.
>
> 2. Move the template files outside of the web root, which is the folder
> that gets displayed when you browse tohttp://www.example.com/
>
> - --
> Edward Z. Yang GnuPG: 0x869C48DA
> HTML Purifier <htmlpurifier.org> Anti-XSS HTML Filter
> [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFGWaFFqTO+fYacSNoRAoJEAJ9VcMPpjvCs5IyBDPe2FV qrZPi/uACffuWj
> hmDBhWNQ3s3GGxgVMZnJpWo=
> =w2Sw
> -----END PGP SIGNATURE-----


Thank you, #2 worked like a charm

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:12 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0