We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Port fix to application.php when hosting locally with a port (localhost:8888) | Forum

Lloyd Merithew
Lloyd Merithew Oct 26 '10
The original private function urlHostRedirect() doesn't allow urls with a port like http://localhost:8888/oxwall

Replace the existing function code with new code below:

private function urlHostRedirect()
{
$urlArray = parse_url(OW_URL_HOME);
// returns an array including the port if it exists in the url OW_URL_HOME

if (isset($urlArray['port']))
{
$my_Host = ($urlArray['host'].':'.$urlArray['port']); // rejoin the host and port to build the url part like localhost:8888
} else {
$my_Host = ($urlArray['host']); // url without port
}

if ( isset($_SERVER['HTTP_HOST']) && ( $_SERVER['HTTP_HOST'] !== $my_Host ) ) // check to see the _SERVER['HTTP_HOST'] not equal to OW_URL_HOME
{
$this->redirect(OW_URL_HOME . OW::getRequest()->getRequestUri()); //redirect to proper url
}
}
Den Team
Den Oct 28 '10
Hello!
Thank you for instructions! But it seems we have fixed this issue in Beta5. On what version did you test this fix?
Lloyd Merithew
Lloyd Merithew Oct 28 '10
Addenster,

I'm using ow_1.0b5 on Mac Server 10.6.4 with MAMP. http://www.mamp.info/en/index.html

Regards
The Forum post is edited by Lloyd Merithew Oct 28 '10
Ania Queen
Ania Queen Feb 3

For small business hosting just starting their online journey, finding a hosting service that combines reliability, scalability, and support is crucial. Services like HostGator and InMotion Hosting are often recommended for their balance of performance, price, and customer support, providing a solid foundation for websites of all sizes.


beyondherd
beyondherd Apr 8
I am also facing the same error while hosting mod apks on my web Mod APK Provider. Let me know if you got any solution for this. Thanks
ALI SHER
ALI SHER Apr 16
i am addicted to computer games that is why i bought a gamecube for me and my brother,. ku11
ALI SHER
ALI SHER Apr 16
I love blogging and i can say that you also love blogging. reparation ordinateur courbevoie
ALI SHER
ALI SHER Yesterday, 01:30AM
you have got a great weblog here! do you need to make some invite posts in my weblog? dépannage informatique courbevoie
ALI SHER
ALI SHER Yesterday, 05:43AM
Really informative and great bodily structure of subject matter, now that’s user friendly (:. dépannage ordinateur courbevoie