I am working on a drupal site. The current issue is that when a link is created either by using the url()
or the base_path
variable, it works ok on local development environment but when the very same code is put on the server, the url prepends node
string in the path.
e.g. the path is <drupal site>/latestnews
. The generated path is <drupal site>/node/latestnode
and when clicked, it shows the page not found
error. However would like to mention that the links work fine (i.e generate correct path) when clicked from the home page.
any help would be appreciated. If it helps, I am using Pantheon hosting for testing.
Does the server by chance have the pathologic module enabled? That module's job is to rewrite links for different locations. It may be misconfigured. If it is enabled, try disabling it, or adjusting its configuration in each of your text formats (admin/config/content/formats).