Welcome Guest, Not a member yet? Register   Sign In
Google ads + .htaccess + CI routing = 400 Bad Request
#3

[eluser]gautaml[/eluser]
Well this is just interesting.

I was wondering if it could be badly formatted HTML since in my page rendernig process I process the page as this to strip out all tabs line breaks and comments:
Code:
preg_replace('/<!--(.*)-->/Uis', '', preg_replace('/\t+|\r\n|\n|\r/', '', $output));
Somewhere in tehre it was messing up the google code

Here's the original code:
Code:
<div id="adbar">
    [removed]&lt;!--
        google_ad_client = "ca-pub-xxxxxxxxx";
        /* 728x90 */
        google_ad_slot = "xxxxxxxxxx";
        google_ad_width = 728;
        google_ad_height = 90;
        //--&gt;
    [removed]
    [removed][removed]
</div>

If I remove all the HTML/JS comments the ads now come up.

Guess it was fine all along but just something I did. whoops. Smile

BTW thanks John, what you posted made me think twice about what I was doing Smile


Messages In This Thread
Google ads + .htaccess + CI routing = 400 Bad Request - by El Forum - 06-29-2011, 06:48 PM
Google ads + .htaccess + CI routing = 400 Bad Request - by El Forum - 06-29-2011, 07:29 PM
Google ads + .htaccess + CI routing = 400 Bad Request - by El Forum - 06-29-2011, 07:51 PM
Google ads + .htaccess + CI routing = 400 Bad Request - by El Forum - 06-29-2011, 08:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB