Page redirect not working properly

Created on 8 July 2019, almost 5 years ago
Updated 19 February 2024, 4 months ago

My website currently runs on localhost in a specific subfolder, e.g. http://localhost/myapp

I want to add a simple rule: when a new content is added, of a specific content type, user is redirected to a specific page, e.g.
http://localhost/myapp/node/15

But,
- if in the redirect url I write: "node/15" --> after the new content creation, the user will be redirected to: http://localhost/myapp/node/add/node/15 (which is incorrect).
- if I write "/node/15" --> user will be redirected to http://localhost/node/15 --> which is also incorrect (myssing subfolder myapp)

Of course if I write the complete url (http://localhost/myapp/node/15) it works, but when I'll upload the site to the final server, it will not work anymore and I will have to update it again.

Isn't there a more elegant way to solve the problem? Pre-pending a "$path" variable or something similar?

Thanks :)

💬 Support request
Status

Active

Version

3.0

Component

Rules Core

Created by

🇮🇹Italy francoud

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

Merge Requests

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