i'm having the same problem and none of the suggestions so far have been of any help whatsoever.
that's because the people trying to help haven't been able to look at the problem; it's not inside the iphone/ipad. the mobile server of the website you are visiting has been hacked to redirect you (to a rather graphic **** site). the destination doesn't matter - it's not where you meant to go.
if you change your dns server to the "safe" one listed above, it will block the unwanted (****) site, but it won't take you where you intended. (and it won't block non-x-rated ads, either.)
i managed to trigger the redirection, or not, by changing the "user agent" setting on my desktop mac from "safari mac" to "mobile safari iphone" and back, while always trying to open the same web site. (a harmless local small business' site.) it's their mobile server that's doing the hijacking. (and it needs to be fixed!)
i suggest that you contact the owner of the website that has been redirecting you, tell them what's happening, and ask them to contact their hosting provider.
(as for why the hackers would target ios devices specifically, my only guess is that they've got a grudge against apple for some reason. i don't have an android around to test whether they get hijacked as well.)
good luck.