-3

Have a site in which we are pointing some links to www.example1.com.

Recently www.example1.com changed to www.example2.com.

Now if we access www.example1.com it will automatically redirect www.example2.com.

In www.example.com still it point to www.example1.com.

How its working now is...

www.example.com > www.example.com > www.example1.com > www.example2.com.

In our site all links are hard coded.

Question ?

What is the best way to do it ?

Continue to leave it like this or need to update all hard coded values.

Issue is : in future if we update this url again, we need to update code again

Please help me with some suggestions.

Drifter104
  • 3,693
  • 2
  • 22
  • 39

1 Answers1

0

Redirections should almost always only be used during transition and should be removed after a set period of time. Ideally, you should not be using absolute links in your application.

This page provides a pretty good explanation: Absolute vs. Relative Paths/Links

pat o.
  • 1,919
  • 1
  • 16
  • 28