Absolute URLs with Site's Base URL are Converted to Relative URLs, Causes Conflict with I18N

Created on 9 September 2013, almost 11 years ago
Updated 2 May 2024, about 2 months ago

This was probably designed intentionally, but I thought I'd report it because it is causing me some problems. I have an external (non-Drupal) site which lives at the same base URL as my Drupal 7 site. In order to tell Drupal to point links to that site, I have to specify an absolute path. Take the following example:

Normal URL (Drupal site)
http://mysite.com/blog/blog-1

Internationalized version
http://mysite.com/en-us/blog-blog-1

External site, same base URL
http://mysite.com/other-site

I need to set a redirect from some old URLs on my Drupal 7 site to point to a page on the external site. Using the URL redirect settings in the administrative area, I am allowed to set an absolute path. However, because it is *the same* base path as my Drupal site, Drupal automatically converts it to be a relative URL. Then, I81N takes over and adds the prefix.

Original Path
http://mysite.com/blog/blog-1

New Desired path (outside Drupal)
http://mysite.com/new-site/new-url

Output of link by Drupal
/en-us/new-site/new-url

This is causing the link to break because of the en-us prefix. Has anybody found a workaround for this?

I posted this on the I18N issue queue, as well. #2085105: Absolute URLs with Site's Base URL are Prefixed with I18N URL β†’

πŸ› Bug report
Status

Closed: outdated

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sheldonkreger

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024