"Forbidden" message adding affiliate banner
Permalink
Hi everyone,
I can't find anything to directly answer this question. I am trying to add an affiliate advertising banner to my site. I have tried pasting in the html generated at Commission Junction using an html block as well as a content block, and each time I get the error "Forbidden. You don't have permission to access /index.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
I have permissions on index.php set to 755 so I'm not sure what else could be the problem. Any ideas?
I can't find anything to directly answer this question. I am trying to add an affiliate advertising banner to my site. I have tried pasting in the html generated at Commission Junction using an html block as well as a content block, and each time I get the error "Forbidden. You don't have permission to access /index.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
I have permissions on index.php set to 755 so I'm not sure what else could be the problem. Any ideas?
I'm not sure how an iframe is supposed to work, it's just a link that I'm trying to add, that may or may not include an image. The way I understand it you need a complete url for an iframe. The link is something like this
<a href="http://click.linklocation.com/etc?id=myid" >Link text</a><IMG image settings src="http://ad.linklocation.com/etc?id=myid" >
As your ad is just a picture and a link and it does not include any scripts, you should be able to make it work without an iframe. It is ads with associated scripts that generally argue with the hosting page and need to be in an iframe.
Can you say more about the 404 error.
Do other pages on your c5 site load OK?
Does the 404 error happen when you load the C5 page with the ad? or does it happen when you click the ad link?
What happens on this page if you remove the ad code or the html block it is in?
Can you say more about the 404 error.
Do other pages on your c5 site load OK?
Does the 404 error happen when you load the C5 page with the ad? or does it happen when you click the ad link?
What happens on this page if you remove the ad code or the html block it is in?
The whole error message as per my initial post occurs when attempting to "Update" the html block or content block after pasting in the html code - it appears in a pop-up over the block edit window, so I don't even get to the point of being able to add the code to the page.
I have attached a screen shot. BTW this error happens whichever page of the site I try to add the html to.
I have attached a screen shot. BTW this error happens whichever page of the site I try to add the html to.
You have quite correctly blurred out some details. With that limitation in mind, I would hope that the html is well formed and has not broken the DOM for the page (all quotes and html elements correctly closed).
Here are some more diagnostics.
A) In chrome or firefox, get ready to add the html block and right click and 'Inspect Element' to get the document inspector. Go to the network tab and set it recording. Then insert the ad, get the error message, and view the network recording. You should be able to see the request for the add/update and subsequent error 404 response. What's more, you will be able to identify the individual transaction that caused it and which server it came from (ie, your C5 server or the ad server).
B) Put your ad code into a simple html file with <html><body>your code</body></html> about it, upload it to your server and then view it directly in a browser(ie no c5 involved). If you continue to get error messages, you can be sure it is the ad code and not C5 that is causing the problem.
C) As B, but rather than view it separately put it into an iFrame block within C5.
Here are some more diagnostics.
A) In chrome or firefox, get ready to add the html block and right click and 'Inspect Element' to get the document inspector. Go to the network tab and set it recording. Then insert the ad, get the error message, and view the network recording. You should be able to see the request for the add/update and subsequent error 404 response. What's more, you will be able to identify the individual transaction that caused it and which server it came from (ie, your C5 server or the ad server).
B) Put your ad code into a simple html file with <html><body>your code</body></html> about it, upload it to your server and then view it directly in a browser(ie no c5 involved). If you continue to get error messages, you can be sure it is the ad code and not C5 that is causing the problem.
C) As B, but rather than view it separately put it into an iFrame block within C5.
Html seems to be well formed to me, plus I have tested from several different affiliate suppliers.
Doing B works fine, get the link which I can click on. With A, I get the attached, which indicates it's from the C5 server.
C works, putting the link to the html file in B in an iframe
Doing B works fine, get the link which I can click on. With A, I get the attached, which indicates it's from the C5 server.
C works, putting the link to the html file in B in an iframe
As the iframe works, then you have probably come to the same conclusion as me that it may as well become your solution. I suspect that there is something about the saving of the code in the html area that has caused it to become errant.
For example, the input form is a text area and some escape sequences become translated to their actual values when a form text element is saved and then displayed again. I suspect the ad code may have contained such an escape sequence.
For example, the input form is a text area and some escape sequences become translated to their actual values when a form text element is saved and then displayed again. I suspect the ad code may have contained such an escape sequence.
What does an escape sequence actually look like?
I have to admit, I really can't fathom having to use an iframe for each and every link that I want to use - firstly I'd have to create an html file for every link, then create an iframe for each one - that to me is wayyyy harder than it ought to be.
I'm honestly thinking, if that's the only way to do it, I'm dumping c5 for this site and heading to Wordpress. At least I know that will work.
I have to admit, I really can't fathom having to use an iframe for each and every link that I want to use - firstly I'd have to create an html file for every link, then create an iframe for each one - that to me is wayyyy harder than it ought to be.
I'm honestly thinking, if that's the only way to do it, I'm dumping c5 for this site and heading to Wordpress. At least I know that will work.
It would only be for each advertisement banner.
Escape sequences are used to encode information in a url that includes characters that are not allowed in a url. For example, you cant have quotes within a url, so an escape sequence encodes the quotes as a sequence of other characters that is then translated back into the quotes later. You will see things like %22 or "
http://www.w3.org/TR/CSS2/syndata.html...
http://www.w3schools.com/tags/ref_urlencode.asp...
As far as I know, just about any cms can have problems linking external content for similar reasons and settle on similar solutions. The only difference will be how the solution is presented to you.
Escape sequences are used to encode information in a url that includes characters that are not allowed in a url. For example, you cant have quotes within a url, so an escape sequence encodes the quotes as a sequence of other characters that is then translated back into the quotes later. You will see things like %22 or "
http://www.w3.org/TR/CSS2/syndata.html...
http://www.w3schools.com/tags/ref_urlencode.asp...
As far as I know, just about any cms can have problems linking external content for similar reasons and settle on similar solutions. The only difference will be how the solution is presented to you.
Generally, ads are usually best placed in iframes. An iframe sandboxes any html, script and css on the ad from your site and prevents them interfering with each other. There are a couple of free iframe add-ons in the marketplace.