Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Documentation and How To's:
How To: Prevent leaching your bands/* folders
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 06/01/06 14:15 
Well, jamroom has a fancy tool that allows you to create customized htaccess files for your artists directory (the jamroom/bands/ID folders).

It works most of the time, but not right now, most folks don't know about it anyways, so lets forget I mentioned it Wink

I actually found it a bit more convenient to just make it part of a theme so that I can tweak the htaccess files on a per-theme-basis.

How to do it...

Here I will show you how to prevent leaching images from the bands/ID directory...

In your theme.cfg file create:

# My HTACCESS code

htaccess.tpl | .htaccess

Ok, now lets create the template...

Create a template called htaccess.tpl and inside it put the following code:


Code
RewriteEngine on
RewriteRule .*\.(bmp|gif|jpg)$ - [F,NC]


This of course requires mod_rewrite enabled on your server.

Now save everything and go regenerate your artist themes... All set!

You can do anything you want in the htaccess files...and it works real nice, as its part of the .filelist that jamroom creates, so its as easy to remove as it is to install Wink

Happy bandwidth savings!


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
kaliedoscopekid



Joined: 20 Jul 2005
Posts: 33
Location: Houston, TX

Posted: 06/03/06 08:40 
I know this reveals my simple mind but I have to ask... using dreamweaver as my crutch, when I try to create a new template file (for php?) dreamweaver adds its own "text"...

would you post a sample of what exactly this .tpl file should contain so I can copy and use in plain text editor then save as htaccess.tpl (maybe I am confusing myself with the instruction "create a new template file").

and should this be saved within each theme? ie. jm_infrared folder?

Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 06/03/06 11:48 
Yeah, above where it says "code" and the text is in green... Thats what you copy/paste into a empty file called "htaccess.tpl" Wink (just the green text in the code box!)

Hopefully this helps Wink


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
gdogg2000



Joined: 04 Dec 2006
Posts: 67

Posted: 12/05/06 22:15 
I understand most of it but what directory does theme.cfg go under?

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 12/05/06 22:40 
there is a theme.cfg file in each of theme directories (i.e. themes/Cobalt). that is the file that tells jamroom what pages to create for each artist

Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 12/06/06 01:12 
Using this code may cause problems.

Please don't use this "how to" right now~


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
KPM



Joined: 10 May 2004
Posts: 1111

Posted: 01/08/07 22:00 
Hi kaliedoscopekid
Regards using Dreamweaver. You can actually turn the code re-writing function in your preferances so that it doesn't add unwanted code.

Go to the edit menu then
Preferences then
Code Re-Writing then add the files that you don't want re-written in the box like this
.php .tpl .cfg .js .as .asr .asc .asp .ascx .asmx .aspx .cfc .cfm .cfml .config .cs .ihtml .js .jsp .php .php3 .vb .xml .xsl .xslt .xul
then tick the box and click ok and you should be right to go.
Your files will no longer be tampered with by Dreamweaver Wink

Hope this helps
Regards
Kirk


_________________
ExpressMediaPlayer Helps to prevent theft of your artist's play only video & audio media files from cache's and on board MediaPlayers. Wink
New! Displays Add to Cart Links! JR payments pack required.
http://www.mp3express.com.au/jambeta/
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Documentation and How To's

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.