Hi there, have a doubt, Is there a way to design a page so that whenever people get a 302 error/redirect I could make them go to a google adsense page? How does it work?
302 is not an error, it is a redirect only. Are you asking about a 404, page not found error? If so, then add this to your .htaccess file: ErrorDocument 404 /404.html Code (markup): Create a page with your adsense code on it and save it as 404.html in your root. Remember, this is a page not found error page. You should also have a message for your visitor that the page was not found and provide them with a few choices to navigate to, such as, a search page, sitemap, the home page, etc.
Actually after thinking about this a bit, adding adsense to this type of page is not going to help you much. Gotta remember that adsense is based on the content of your page -- and a 404 is not ideal for this type of contextual markup. Are you having a ton of errors for pages not being found? If so, what did you do to start getting them? If you completely overhauled your site and moved things around, then you will need to use the redirect methods.
AdSense used to have a line in their TOS about not using it on error pages. You might want to read their latest TOS to see if it's still there before you do this.