function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Salesforce Admin 2116Salesforce Admin 2116 

how to set up a redirect

Hello! I'm a novice and I'm trying to set up a redirect. I've followed the advice in this article:
https://help.salesforce.com/articleView?id=sites_redirects.htm&type=5#language-combobox

and have also set the URL I want to rediret to as a 'Trusted URL' as per this area of Salesforce

trusted URL screen grab

But the redirect is not working. Is there a step I am missing? 
AnudeepAnudeep (Salesforce Developers) 
What error are you seeing when attempt a redirect? If you are seeing a 404 error, I recommend reviewing this note from the documentation

NOTE Organizations that use sites with prefixes must manually add the prefix to the Source URL and Target URL fields. Also, if your organization has a root level site and one with a prefix, and you want to redirect a page in your prefixed site but don't include the prefix in the redirect rule, Salesforce will default to looking for the rule in your root site instead, resulting in a 404 error.

Also, I suggest trying using the urlRewriter apex class to confirm if there is no issue with your source and target URLs
 
global class yourClass implements Site.UrlRewriter {
    global PageReference mapRequestUrl(PageReference
            yourFriendlyUrl)
    global PageReference[] generateUrlFor(PageReference[]
            yourSalesforceUrls);
}

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
 
Viktoriia KryskoViktoriia Krysko
In magento ecommerse (https://chudovo.de/steps-to-take-your-e-commerce-to-the-next-level/) you can eary do id by 301 redirect