I need to exclude 2 pages.
however one of them can be used multiple times
http://thearcadecorner.com/star-wars-the-old-republic/write-a-review/
The one above can be used in multiple games so all I needed to do was use the code below to exclude it.
As for the second URl its any BuddyPress page where the avatar is being changed.
http://thearcadecorner.com/members/scott0407/profile/change-avatar/
Current code
add_filter('autoptimize_filter_noptimize','my_ao_noptimize',10,0);
function my_ao_noptimize() {
if (strpos($_SERVER['REQUEST_URI'],'/write-a-review/')!==false) {
return true;
} else {
return false;
}
}