Protect your Pligg template files

Posted In General - By Geoserv On Tuesday, April 14th, 2009 With 26 Comments

Want to keep people from viewing and stealing your template files? Of course, we all do.

Here’s a simple way to keep prying eyes out of your template files and stealing your layout and functions.

In your .htaccess, add the following to the very top:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://domain.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com$      [NC]
RewriteRule .*.(tpl)$ http://www.domain.com [R,NC]

Replace all cases of domain.com with your domain name.

The last line you can specify where to send the visitor that attempts to view your .tpl file. I would leave it at your main page.

This will keep prying eyes from viewing your .tpl files.

Test it by trying to view my pligg.tpl file at http://www.faqpal.com/templates/yget/pligg.tpl

That’s it.

This is the best way I have come up with to protect your files. Got a better idea, post it below.

How do you protect your files?

Related Search:

  • how to protect your idea template
  • protect pligg

About - Geoserv has been working with the Pligg CMS for 2+ years.

  • Pingback: Pliggs

  • Pingback: Vote for this article at blogengage.com

  • http://macfanboys.com Denny Sugar

    This will come in handy. (As soon as I have a cool template worth protecting:) Thanks!

  • http://www.blogserp.com bbrian017

    Seems this could be helpful if you have a cool and unique pligg template!

    I personally don’t care if people steal my template!

    I’ve been asked many times to give a copy away via people sending the request using e-mail!

    I have a company doing some work for me in my career and they can easily steal any website template I was so surprised!

  • Pingback: iamatechie

  • Pingback: Protect your Pligg template files

  • http://www.dzinestand.com/ Web Design

    Nice Post. Thanks for Sharing Info For Protecting the our Template.

  • http://www.gatewaytechnolabs.com/lang,en/services/game_development.html Flash Game Development

    Really very nice post!!

    This will really help us to protect our templates.

  • http://www.tr3ndy.com Carlo

    Hi,
    I try to put in .htaccess on a site, but for me under Dreamhost, doesn’t work, if I click the path with pligg.tpl I can download it from browser…

    Any idea?
    .-= Carlo´s last blog ..Dictionary.NET un interessante Traduttore instantaneo freeware =-.

  • http://www.carpetcleaningservicesclearwater.com Carpet Cleaning Clearwater

    Good resource for protect pligg template files. Thanks for information.

  • hiteshthakur034

    gud…its gud…..template files r a great matter of security……i needed this….

  • hiteshthakur034

    gud…its gud…..template files r a great matter of security……i needed this….

  • Pingback: Twitter Followers Helping in Your Sales « Hitesh Thakur

  • http://www.tampabaypos.com/ Restaurant POS Systems

    It's really need to protect your any template files and blogs. Thanks for information.

  • http://www.bedsforlife.com.au Beds Melbourne

    Lee, thanks for letting me know about the FeedBurner problem. Should be working now.

    Glad you enjoyed the template!

  • http://www.aseks.com sex shop

    Good resource for protect pligg template files. Thanks for informations

  • http://www.agorshop.com/ erotik shop

    I try to put in .htaccess on a site, but for me under Dreamhost, doesn't work ;)

  • http://www.allvoices.com/contributed-news/5807173-tej-kohli-ipad-review Tej Kohli

    I had changed my Pligg template one week ago , While I was checking its cache I found that there are many unwanted links cached with my home page , Even not showing while I am Browsing

  • http://www.efytimes.com/e1/50626/fullnews.htm Tej Kohli

    I had changed my Pligg template one week ago , While I was checking its cache I found that there are many unwanted links cached with my home page , Even not showing while I am Browsing

  • http://www.rightwaysolution.com Web Development

    Thanks for sharing good tips of protect template files and documents.

  • http://www.themattresssuperstore.co.uk Memory Foam Mattress

    I am not good at internet marketing and i am looking for a good way to make money online. In a quick way.Does anybody know of a good way to make money online without internet marketing?

  • http://www.libertyforexchange.com Liberty Reserve

    Hmm, thanks for sharing man.

  • http://www.albenishop.com seks shop

    It’s really need to protect your any template files and blogs ;)

  • http://www.canedirectfurniture.co.uk/ Outdoor Furniture

    I’ve seen various legal forms for sale on different websites for completing watercraft transactions. I really just need a blank template in Word or PDF format to complete a transaction. I realize I could probably just type up something simple myself but I would like a legitimate one that confers some legal protections. Any ideas where to find one?

  • http://www.canedirectfurniture.co.uk/ Outdoor Furniture

    Looking for a wordpress template with a good menu system for displaying pages…not categories.What is the best WordPress template to use for a niche site with many pages (not categories.Thnaks

  • http://www.bigponypoloshirts.co ralph lauren big pony

    nice info. thanks.. 
    I’ll choose one of them.