WordPress.org

Support

Support » How-To and Troubleshooting » website is redirected to localhost/mywebsite

website is redirected to localhost/mywebsite

  • Ok i installed wordpress to my computer for testing purposes. I’m using the WampServer so that i’m able to disable access from the internet to the server using an easy interface. I just want to be able to customize my wordpress based website and then be able to present it to someone using the internet. The problem is that if someone tries to connect to my website’s address (i’m using dyndns) they are redirected to localhost/mywebsite instead of *****.dyndns.org/mywebsite. If i change the address in wordpress’ options from localhost/mywebsite to *****.dyndns.org/mywebsite then i won’t be able to edit my website when the server is offline (internet users can’t access it, only i can). Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • How about edit your machine’s HOSTS file and map *****.dyndns.org to the local IP?

    You mean add an entry to the file C:\WINDOWS\system32\drivers\etc\hosts such as the following (127.0.0.1 *****.dyndns.org) or (192.168.1.64 *****.dyndns.org)? I restarted the server afterwards but it didn’t work.

    Yeah 192.168.1.64 yourdomain.dyndns.org in the hosts file and yourdomain.dyndns.org/mywebsite in wordpress’ option.

    The hosts file is the one in your computer, not the one in the server.

    My computer is the server. Should i just add 192.168.1.64 yourdomain.dyndns.org to the hosts file on my pc or do something additional?

    My computer is the server.

    Then either of “127.0.0.1 *****.dyndns.org” or “192.168.1.64 *****.dyndns.org” should be fine. Remember to do ipconfig /flushdns before testing. I would also check ipconfig /displaydns to see if hosts setting is reflected.

    If this(and of course the Apache settings) was set correctly I’m not sure what is wrong.. would leave this to someone know better about networking.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘website is redirected to localhost/mywebsite’ is closed to new replies.