user2535056
user2535056

Reputation: 4233

window.location.hash does not work after domain redirect

When the webpage is loaded I use window.location.hash to add imformation to the URL. Since I bought a domain name redirecting to my server IP it is not working anymore. Only the domainname.com is displayed. Although the hash operation is performed. What could be the reason?

Upvotes: 0

Views: 225

Answers (1)

Quentin
Quentin

Reputation: 944498

You aren't using proper domain hosting.

Instead of pointing the domain at the IP address of your server (and configuring the web server to support Virtual Name Hosting if you are dealing in multiple sites there) you are letting your Domain Registrar point the domain at their server where they provide a simple web page consisting of a frame (this is known as "Domain Forwarding", "Domain Masking" or "Yuck").

When you set location.hash, you are setting the location of the frame, not the window.

Upvotes: 1

Related Questions