#1 (permalink)  
Old 03-05-2004, 11:32 AM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
auto inserting

is it possible so that say someone chooses the package named "free" on my website, a banner is automatically added onto the top of all their pages, but for ones like bronze, silver and gold package, there would be no banner inserted?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-05-2004, 01:35 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
Need help on adding banners to customer site
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-05-2004, 05:35 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
now thats useful, but i got 1 slight problem still... the banner must not display on people who pay to have websites
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-05-2004, 05:58 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
That's where you would put the code in the /home/username/.htaccess files so it only applies to the accounts that have the code written to it. The drawback to that is, either the client can modify that file to remove it, or it has to be read only for the client which means they can't use it for anything else. For free hosting they don't need use of that file anyway.
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-05-2004, 06:00 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
ok thanks, how do i make the 1 file read only, and last drawback is i need the code to display at the TOP of the page
not the bottom lol, any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-05-2004, 06:11 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
Change append to prepend to put your file at the top.

I'm not positive about the proper way to write protect the file, but I would just do "chmod /home/username/.htaccess 0444" in shell which would make it only readable. If you ever want to change it you would have to put it back to 0644. It might also work if you leave it at 0644 and do "chown root /home/username/.htaccess" which would make root be the owner and therefore the only one who can modify it.
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-05-2004, 06:12 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
ok, thanks loads, you been lots of help, if i get stuck i know where to come
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-05-2004, 06:15 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
This is where I posted a lot of questions when I was new.
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 03-05-2004, 06:16 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
:P one word... YEEEEEESSSSS I JUST HCANGED ME NAME FROM WEBB-HOSTING.CO.UK TO WEBB-HOSTING.NET AND IT WORKS!!!!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 03-05-2004, 07:57 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
ok, changed chmod - 1 probelm - i can still delete the file ad.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 03-05-2004, 08:09 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
Not if you put it outside of the users directory.

The sample shows the path being like /home/username/.... but the path can actually be to anywhere, like /home/ad.php which would prevent any user from getting to it.
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 03-05-2004, 08:10 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
doesnt stop them editing .htaccess through

ill try that thorugh aswell
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 03-05-2004, 08:15 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
ok, thats worked, how can i protect the .htaccess file? users can edit or delete it with ftp even if chmod is set to 0

the user in ftp can also hcange the chmod settings
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 03-05-2004, 08:27 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
how exatly lol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 03-05-2004, 08:30 PM
Registered User
 
Join Date: Feb 2004
Posts: 48
webbhost
im guessing htats through SSH, and if it is do i have to do it whilst in the current folder?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:30 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc