Jump to content

Internal Link Format On Static Site


chrisat1

Recommended Posts

I’m building my website in a home based web server. As I have started to create internal links I’m wondering what the proper way of referring to the machine. 
Do I use the internal up address, local host or the outside domain name when referencing the root? What is best practice here?

 

example.com/things

localhost/things

192.168.1.99/things

Link to comment
Share on other sites

You should omit the domain altogether. Preceding a path with a slash will make it relative to the website's root:

<a href="/things">

If you need to access your site from a different website you should put it on a public server.

Link to comment
Share on other sites

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...