Drupal base URL and root relative paths
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.The Pathologic module provides input filtering to correct URLs that are no longer correct because of configuration changes. Here is an excerpt from its project page:
... an input filter which can correct paths in links and images in your Drupal content in situations which would otherwise cause them to “break;” for example, if the URL of the site changes, or the content was moved to a different server. Pathologic can also solve the problem of missing images and broken links in your site’s RSS feeds. See more example use cases on the documentation page.
Pathologic is designed to be a simple, set-it-and-forget-it utility. You don't need to enter any special “tags,” path prefixes, or other non-content noise into your content to trigger Pathologic to work; it finds paths it can manage in your content automatically.
Define what you mean by root-relative paths. If you are talking about the front paged linked to
http://www.example.com
you may edit $base_url
in settings.php
.
If you are talking about
<a href="/">Home</a>
linking to
http://www.example.com
that has nothing to do with Drupal, though the Pathologic module mentioned by @sutch may help.
精彩评论