1

I'm developing a new website to replace our old website. The URL the dev site is 11.22.33.44/~abc/ (not that IP exactly) because that's what Host Gator gave me to use. Once complete, I'll change DNS servers so our domian name points to that server and not our old one.

I'm using Drupal and am taking great care to keep all links relative. However, because of the /~abc/ in the dev URL, it's not always possible to keep it relative and many links will break. Within the drupal system or anywhere drupal PHP is used, like for menus, it can figure out the URL on it's own. But for any images and links entered into the WYSIWYG, those will break.

Can a soft link (symbolic link) fix this problem? Should I use the command ln -s /~abc /? Will the URL mywebsite.org/~abc/node/1 then show the page mywebsite.org/node/1 ??

I know this is not ideal for SEO, maintenance, and other reasons. But it would make the migration much smoother and quicker. Thanks!

Dan Mantyla
  • 153
  • 1
  • 1
  • 9

2 Answers2

1

A sym link will take care of your file system problem. Make sure you have the same permissions for folders and files in both your old app and your new one.

For your images, I would take a look at 301/302 redirects. Take a look at this post here:

https://stackoverflow.com/questions/8700621/htaccess-r-301-vs-r-302

Hope that helps!

M.W. Felker
  • 174
  • 1
  • 4
  • I choose this as the best answer because it will solve my problem and will work. However, there *may* be a better way to do it but it would require using this from the start. It involves modifying the hosts file on my workstation to go to the IP address when I use our domain name in my bowser. Here's the link to the Q/A on webmasters.stackexchange.com: http://webmasters.stackexchange.com/questions/68714/can-a-soft-link-be-used-to-fix-url-problems/68715?noredirect=1#comment77323_68715 – Dan Mantyla Sep 16 '14 at 20:23
0

No, symbolic links cannot be used for website URLs. Symbolic links are a type of filesystem feature used in operating systems to create a reference to a file or directory in a different location. They are not related to URLs or web addresses.

Websites use URLs (Uniform Resource Locators) to specify the address of a resource on the internet. URLs consist of various components such as the protocol (e.g., "http" or "https"), domain name, path, and query parameters. Symbolic links do not have any role in defining or handling URLs within the context of a website.

To control URLs on a website, you would typically use techniques such as URL rewriting, routing, and redirection within your web server or application framework. These methods allow you to define how URLs are mapped to specific content or resources on your website.