URL Redirects: Some work, Others Do Not

Some site URL redirects work, and others do not. Can you help me understand this?

Redirects are added in: site.yaml
Attempted to resolve by commented/uncommented all items in .htaccess but no joy.

Example of a redirect that does not work:
FROM /decorative-rock-and-gravel/eastern-sunrise-gravel
TO /products/rock-gravel
But instead of redirecting to: /products/rock-gravel
It redirects to: /products/rock-gravel/eastern-sunrise-gravel
**Which is a combination of the TO url /products/rock-gravel **
…followed by the END of the FROM url /eastern-sunrise-gravel(edited)

Example of redirects that do work
FROM /wall-stone --> TO /products/wall-stone
FROM /portfolio/wall-stone --> TO /products/wall-stone

Contents of /user/config/site.yaml

title: 'Landscape Design & Supply, Hardscapes, Waterscapes, & Natural Stone Ponds | Earth Source Jacksonville, FL'
default_lang: en
  name: author
  email: anon@anon.com
  - category
  description: 'Earth Source is a landscaping supplier, plant and tree nursery and natural stone pond engineers'
  enabled: false
  format: short
  size: 300
  delimiter: '==='
  /shop: /
  /soils: /products/soil
  /garden-steppers: /products/garden-steppers
  /boulders: /products/boulders
  /wall-stone: /products/wall-stone
  /flagstone: /products/flagstone
  /mulches: /products/mulch
  /contact-us: /contact
  /category/products: /
  /author/beckyadmin: /
  /boulders/earthsource12: /products/boulders
  /flagstone/earthsource20: /products/flagstone
  /portfolio/wall-stone: /products/wall-stone
  /mulches/mulch-gold: /products/mulch/golden-mulch
  /mulches/mulch-pinenuggets: /products/mulch/pine-bark-nuggets
  /soils/soil-top: /products/soil/top-soil
  /flagstone/sandstone-select: /products/flagstone
  /flagstone/stone-pinola-2: /products/flagstone/pinola-flagstone
  /decorative-rock-and-gravel: /products/rock-gravel
  /flagstone/stone-palomino-2: /products/flagstone
  /flagstone/arkansas-sebastian-patio: /products/flagstone
  /flagstone/quartzite-blue-mica: /products/flagstone
  /flagstone/stone-irregular-bluestone: /products/flagstone
  /flagstone/quartzite-cayon-gold: /products/flagstone
  /decorative-rock-and-gravel/scrap-rock: /products/rock-gravel
  /decorative-rock-and-gravel/rock-rarered: /products/rock-gravel
  /decorative-rock-and-gravel/rock-coloradosun: /products/rock-gravel/colorado-sunrise-gravel
  /decorative-rock-and-gravel/rock-honeycutt: /products/rock-gravel
  /decorative-rock-and-gravel/rock-67-stone: /products/rock-gravel
  /decorative-rock-and-gravel/rock-pea-gravel: /products/rock-gravel/pea-river-rock-gravel
  /decorative-rock-and-gravel/eastern-sunrise-gravel: /products/rock-gravel
  /decorative-rock-and-gravel/crushed-coquina-gravel: /products/rock-gravel
  /decorative-rock-and-gravel/salt-pepper-granite: /products/rock-gravel
  /decorative-rock-and-gravel/black-lava-rock: /products/rock-gravel
  /decorative-rock-and-gravel/pink-granite-gravel: /products/rock-gravel
  /decorative-rock-and-gravel/gray-variegated-granite-gravel: /products/rock-gravel
  route: /blog

Other than single-quoting the key and value of redirects, there is nothing the matter with the above. Keep in mind, the redirect only works when there is no Page where the page redirects from. So user/pages/decorative-rock-and-gravel/eastern-sunrise-gravel must not exist.

  1. Correct, this page does not exist: /decorative-rock-and-gravel/eastern-sunrise-gravel
    It existed on the old website. How do you recommend I fix this without creating a dummy page?

  2. However, the following pages also do not exist but the redirects work:

a. /wall-stone (this page does not exist, however, /portfolio/wall-stone does exist, not sure why this redirect works.

b. /portfolio/wall-stone … for this url a page of /portfolio exists, so apparently it is making a connection of replacing /portfolio with /products and the redirect works because the second part of the url is the same from the old site to the new as ‘/wall-stone’ so it worked.

What does your /user/pages-structure look like? Could you give an overview of what Pages are there? I don’t see any immediate pattern in the redirects that would cause varying results.

Could you also detail your server-setup further? Ie., what is the path the site is served from, does it use a subfolder- or subdomain-setup, how is .htacces or other equivalent set up.

Might also be helpful to see system.yaml, especially in regards to absolute URLs.