By kellyllek on
I changed the Drupal base url in settings.php to " http://www.example.com/subfolder " but root relative paths are still pointing to " http://www.example.com " and not to the correct subfolder. Any idea what I'm doing wrong? I flushed cache re-edited a couple links to make sure but they're still pointing to the root domain and not to the correct subfolder. I even ran update.php. Still no luck.
Comments
Are you saying that you are
Are you saying that you are trying to move your site from example.com to example.com/subfolder? If so, changing the base url doesn't do that. You need to add a symbolic link, or make some other change on the server so that subfolder on the server points to the Drupal root folder. If you have clean urls turned on, you may also need to adjust your url rewriting.
Thanks David. Actually my
Thanks David. Actually my head spun round so much trying to figure this out that I gave up and moved the site to an 'extra' domian I had so the root relative path issue wouldn't happen. Now I'm able to build all the links from the root, i.e. "example.com/link" is being built at "/link". so when I do move the site to it's proper domain everything will fall in place.
The deal before was I was using a sub directory as the test bed, like example.com/test was the root. So if I had a link of example.com/test/link, trying to create a root relative path of simply "/link" would not work as now matter what changes I made to identify 'sub folder' as the root of the site. The root relative paths just would not work. I hope that makes sense!!!
It is definitely true that a
It is definitely true that a link "/link" will go to the root of the domain. This has nothing to do with Drupal. Something like href="/link" will always go to example.com/link. If the links are generated by Drupal, like with the menu, it should create /test/link. If you made the links yourself, you will have to go in and change them all manually. Something hard-coded in node body text as /link will stay that way.