WordPress.org

Ready to get started?Download WordPress

Forums

website is redirected to localhost/mywebsite (6 posts)

  1. Threshold
    Member
    Posted 5 years ago #

    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?

  2. yoshi
    Member
    Posted 5 years ago #

    How about edit your machine's HOSTS file and map *****.dyndns.org to the local IP?

  3. Threshold
    Member
    Posted 5 years ago #

    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.

  4. yoshi
    Member
    Posted 5 years ago #

    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.

  5. Threshold
    Member
    Posted 5 years ago #

    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?

  6. yoshi
    Member
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic