Author Topic: Protect templates dir?  (Read 4075 times)

0 Members and 1 Guest are viewing this topic.

Offline msa1382002

  • Newbie
  • *
  • Posts: 10
    • View Profile
Protect templates dir?
« on: March 08, 2007, 10:14:30 AM »
hi everyone

THIS IS VERY IMPORTANT Question:

how can I protect my template DIR from direct viewing  EX: www.MYSITE.com/4images/templates/default

1----------------first ..I tried to disable listing by put ""index.html" in (../templates/default ) << didn't work
                  ------------------  Still any one can view any template directly  ... EX:  www.MYsite.com/4images/templates/default/header.html

2--------------- second ..I tried to put  "" deny from all "" in ".htaccess" in (../templates/default)<<<<< didn't work
                   ----------------- pictures did apear in main page and some errors in style

3--------------- at last ..I tried to put  ""Redirect /*.html http://www.Mysite.ws/index.html "" in ".htaccess" in (../templates/default )<<<<< didn't work
                   ----------------- no chnges , still can view any template without redirect !!!!!!



any one have any ideas or any solution to solve this problem ???

I just want to disable any *.html from (../templates/default)
For EX: if any one  tried  www.MYsite.com/4images/templates/default/header.html ,, appear error page or redirect to main page ..



thanks
« Last Edit: March 08, 2007, 12:47:13 PM by kai »

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Re: Protect templates dir?
« Reply #1 on: March 08, 2007, 12:53:55 PM »
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline msa1382002

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Protect templates dir?
« Reply #2 on: March 09, 2007, 07:37:23 AM »
thanks kai
the links are a tutorials of .htaccess

it couldn't help me bacause i don't want to disable Only directory listing  :cry:

i want to disable showing *.html inside it

i don't want anybody show EX   :www.MYsite.com/4images/templates/default/header.html


so is thre is a specific code i can use ???????

any one can help ???? :(

Offline CeJay

  • Sr. Member
  • ****
  • Posts: 425
    • View Profile
Re: Protect templates dir?
« Reply #3 on: March 09, 2007, 08:56:32 AM »
I believe you can use a redirect in htaccess.
Look at some of those tutorials for that

I dont know exactly what you would have to put so I can not help.

If you have cPanel through your hoster then you can set up a redirect that way. It only stops people from going directly to what page you specify.

Offline msa1382002

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Protect templates dir?
« Reply #4 on: March 10, 2007, 08:52:13 AM »
thanks Cejay

i know i can use redirect but i dont know any code works correctly !!! ... many codes stops  4images to work  !!!!!!

Don't you people protect your  templates  :o :| :| :|

can anyone help us with a working code ?????????????????????????????????????????????????


waiting !!!!