Having a banner on all pages

Status
Not open for further replies.

Yatagrasu

New Member
Messages
12
Reaction score
0
Points
0
Information:
Corporate Plan
Runehenge

I'm using the require() php function to call pieces of my page (such as the navigation bar) together. The TOS states that I have to have a banner ad on all publicly viewable pages
3. Advertisement Policy(Applies only to Advanced & Corporate Plans)
We require avertisements are required to be placed on your website. This is a form of revenue for x10Hosting and helps us continue to offer free services like this one to you. You must follow the below terms in order to avoid suspension, or in extreme cases, termination of your hosting account.Advertisements are expected to be placed on a working site within one week of sign-up.
» Proper advertisements are required to be placed on each and every page of your website.
» Advertisements are to be placed in such a spot so that the end-user can view them without having to scroll down on the page.
» Advertisements must be placed on your site. They may not be placed on any pop-ups or pop-unders.
» The advertisement and its source code must be on your page entirely. The image or code for the advertisement must not be edited in anyway.
» You may not promote clicking of the advertisements on your web site.
I know I could just use the <meta> tag or use a robots.txt file and just place them in a directory with it robot protected by those two things, but that really dosen't do much and I'm sure thats a very ineffective way of dealing with this.

So my question is: What am I supossed to do? I obviously can't put a banner on a page I'm including in another page which has a banner, and I'm not sure how to deny others access while still allowing php to access those files.

Thank you.
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
I do!

Put any file that will be included/required in a sub folder (i called mine contentincludes).

Use a .htaccess file and deny access to that folder.


Here's the weird part - include and require can still load the files in that directory. They just can't be directly accessed on their own without either a 403 or a 404. PHP can still open them for reading/writing/etc though :)



And yes that will keep you from getting suspended - never been suspended once and I was doing includes most of the time I had an account here on free :)
 
Last edited:

Yatagrasu

New Member
Messages
12
Reaction score
0
Points
0
Hmm. Could you give me the code to put in the .htaccess file? I've never coded in one before.
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Hmm. Could you give me the code to put in the .htaccess file? I've never coded in one before.

Gimme about 5 minutes to find where I put the old copy of my website, then tap refresh and there should be code here :)


Edit: If I found the right .htaccess file:

Code:
Deny from all

I thought it was gunna be a bit more complex than that >_<

Edit 2: If anyone else has any thoughts on that lemme know; that's what both of the denying .htaccess files I had on my site were using, with the exception of 1 which did it a slightly different way (see below).

Should be able to use either the Deny from All, or this:
Code:
<Files *>
order allow, deny
deny from all
</Files>
:)


Hope that helps!
 
Last edited:
Status
Not open for further replies.
Top