# Apache and php forum relative url path

## majk

How to make forum work when using both ip adress in LAN and dyndns name?

I'm using Apache server and Simplemachines forum. If I set forum URL to http://192.168.xx.xx/forum

then only users on local network can see it right. Users from internet can't see any graphics, only text

version of first page (index.php).  In the page source i can see that apache can't convert relative url 

path in php code, it leaves 192.168.xx.xx

In apache2 httpd.conf "Use canonical names" is set to "Off" and other html pages on the server have 

relative url path links converted correctly in either case (LAN / internet acces).

In the other hand, when I set forum url to http://_servername_.dyndns.org only users from Internet 

can browse forum without problems, but LAN users see no graphics and only first page.

I think that's because link url's are stored in mysql database? How to avoid that?

I can't edit hosts file in ALL lan computers, and internet router doesnt allow loop connection (even if 

dyndns names are resolved right, the router doesn's allow to LAN ip adress connect it's own 

public IP of the router from inside and then back to lan where server is)

----------

## elgato319

You could try to set the servername to bla.dyndns.org and enter:

```
bla.dyndns.org        192.168.x.x
```

in your /etc/hosts

maybe this will help

----------

## majk

it works, but only on my computer... we have 10+ computers in the lan and that's not a solution

----------

## nobspangle

Host a local dns server that serves the local addresses for the machines on your internal network.

----------

## majk

That's too complicated for me. Can Apache force convert links in html code something in .htacces file? Anyone have experience with this?

----------

