F
F
filippokk2015-07-08 20:29:15
local server
filippokk, 2015-07-08 20:29:15

Accessing local site after port forwarding?

There was one problem, I made access to local hosting files via the Internet using port forwarding, now I have another problem, I can’t work on the site normally on the local PC, i.e. in config.php and admin/config.php configs changed localhost to:
define('HTTP_SERVER', ' 188.226.49.141/oc/admin ');
define('HTTP_CATALOG', ' 188.226.49.141/oc ');
now, accordingly, the layout and styles on the local PC are not displayed correctly, what can be done here so that it would be possible to work both locally and via the Internet?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Zuev, 2015-07-08
@filippokk

If you try to dynamically substitute the host

$host = $_SERVER['HTTP_HOST'];

define('HTTP_SERVER', 'http://'.$host.'/oc/admin/');
define('HTTP_CATALOG', 'http://'.$host.'/oc');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question