Jump to content

Forum Blocked, Way Around It?


Guest Shadow Wolf

Recommended Posts

Posted

This is a request from some of my clients that I admin and host IPB forums with. Recently one of them has had their work block all websites with "register" in the domain name. Unfortunately their forum is hosted in a subdomain of a website with register in it. They have blocked it by domain name and not IP as he can go to the IP address to view it, however IPB is looking for things based on domain name, not IP the css doesn't work properly, login doesn't work, etc.

Is there something server side that I can do to reroute or bypass the issue for them? Or are they stuck either dealing with it or using a proxy server to bypass it?

Posted

One "hack" that would work.

Have them modify their Windows hosts file and add something like

mysite ip address here

Then on the site check the "HTTP_HOST" server parameter - if set to mysite do a preg_replace (or str_replace) in class_display.php to change the real domain name to the fake one. Anyone else would be able to do this too, but they'd have to know the change existed to take advantage of it.

Posted

preg_replace ... something like:

$string = 'mysitedomain';

$patterns = 'mysitedomain';

$replacements = 'fakename';

echo preg_replace($patterns, $replacements, $string);



I haven't tried editing yet to test it though. Mainly because still not sure of the ramification of this. Will this effect the people who don't have their hosts files modified, aren't blocked, etc?

Posted

I'd go with something more like

{ // If we're here, they visited by requesting "fakedomain" so let's keep it that way $page_content = str_replace( "mysitedomain", "fakedomain", $page_content ); }

if( strpos( $_SERVER['HTTP_HOST'], 'fakedomain' ) !== false )




Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...