Microsite redirect to the default domain when "Enforce clean and canonical URLs." in the redirect module settings is enabled

Created on 8 October 2023, about 1 year ago
Updated 11 September 2024, 2 months ago

Problem/Motivation

I have created the Microsite with the path /test-micro-site and in the "Domain site settings" for the microsite I have added the default front page. but now when I try to visit the microsite it redirects to the default domain with Default redirect status 301.

I have the redirect module enabled and the "Enforce clean and canonical URLs. " option was checked. but if I uncheck this option the microsite works fine and doesn't redirect to the default domain.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom swatichouksey4u

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

Comments & Activities

  • Issue created by @swatichouksey4u
  • πŸ‡ΊπŸ‡ΈUnited States drpldrp San Francisco, CA

    Looking into it.

    There were some changes to the outbound path processing to use $option['prefix'] in an attempt to get things working with Language.

    Might have to revert and abandon Language compatibility for Redirect.

  • πŸ‡ΊπŸ‡ΈUnited States drpldrp San Francisco, CA

    Try this patch.

    It removes a condition for $option['absolute'] in the outbound path processor. The condition prevented "absolute urls" from having the microsite path appended to the url. Redirect module "enforce canonical" setting does some logic based on absolute urls.

    Unfortunately I can't recall if it was really necessary to exclude absolute urls from being altered with the microsite base path. I think my logic at the time was just that absolute urls should be absolute.

  • πŸ‡¬πŸ‡§United Kingdom swatichouksey4u

    Thanks, The Provided Patchis working fine.

  • πŸ‡ΊπŸ‡ΈUnited States brad.bulger

    I think I know why you had that absolute URL logic in there. In the unpatched code, links to nodes that are tied to other domains with Domain Source show correct URLs to that domain. With the patch, they all come out in the current microsite domain. These are links generated by Linkit in CKEditor 5.

  • πŸ‡ΊπŸ‡ΈUnited States drpldrp San Francisco, CA

    Fixed in 2.0.0-beta6.

  • Status changed to Fixed 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States drpldrp San Francisco, CA
Production build 0.71.5 2024