up vote 0 down vote favorite
share [g+] share [fb]

I changed my 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.

link|improve this question
feedback

closed as off topic by quack quixote Jun 3 '10 at 21:20

Questions on Super User are expected to generally relate to computer software or computer hardware, within the scope defined in the faq.

1 Answer

I don't know if this answer will help you. If your relative links starts with a slash "/" they are relative to the root. So a relative link "/contact" for example will go to "http://www.example.com/contact" with both base URL. a link to "contact" will go to "http://www.example.com/subfolder/contact" in the first case and to "http://www.example.com/contact" in the second case.

link|improve this answer
Thanks fgranger, I understand that part of it. My issue is that I'm building the pre-production site in a subfolder and want to use root -relative links within content so they'll always point to the correct page in the site no matter where I eventually install it. But even with changing the "base url" of the site and trying a myriad of other things the root relative links drop right to the real root folder rather than the sub folder I want them too. It does mean the links will work eventually when the site is in the root, but for testing an other purposes it fails. It's very frustrating. – kellyllek Feb 5 '10 at 12:56
someone pointed me to the PathLogic module that is meant to correct these issues, so I'll have to take a look at that... Thanks for your answer though... – kellyllek Feb 5 '10 at 12:57
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.