I am trying to setup a drupal website dump that I was given on my local machine. I was able to do it but the internal links don't take the root folder name.
For eg: Let the name of the root folder in the dump be xyz. All the internal links (since they are relative paths) have URLs such as xyz/faq, xyz/issues.
On my local machine, I renamed the root folder to pqr. Now, shouldn't the internal links point to URLs such as pqr/faq and pqr/issues? This doesn't happen, unless I explicitly type the link the address bar of the browser. I also tried keeping the same folder name i.e. xyz on my local machine. Even then the same problem exists, it cannot find the page when I click on any internal link.
Please let me know on how I can solve this. I am using version 6.22
Thank you.
Comments
Use base_url
You can try setting up the base_url in settings.php.
However whatever you have stated should work, but you can try this out.
Also, if you have hardcoded links, then it will not work, you will have to change the links, infact we should not use hardcoded links, using base_url is the the best remedy.
Vaibhav Jain
base_url didn't work
Thank you for the response.
I tried setting base_url, that didn't work. For now, I renamed the root folder to the one that internal links point to.
What do you mean by "internal
What do you mean by "internal links?" Do you mean links that you have added in Drupal's menu system? Or do you mean links that you have added via HTML in node bodies?
In the case of the former, these should be fine assuming they were entered as paths relative to the web root. In the case of the latter, you might investigate using something like http://drupal.org/project/pathologic
Assuming you are using Apache I'd advise against using subdirectories when building sites and instead leverage virtual hosts so that the URLs don't cause these problems in the future http://httpd.apache.org/docs/2.2/vhosts/
internal links
Thank you for the response.
These are the links in the menu. Is there any way to check the paths without loggin in as admin? Can we check it by going through the source files? If so, which files can I check?
I am not the one who designed this website and I don't have admin login credentials. So I cannot check out the paths by logging in.