I think Apache or Nginx redirects would be ideal if you have access to them.
Probably not as easy if you are cloud hosted.
Nathan I. Keiter | Lead Network Applications Programmer | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone:
717.337.6993
https://www.gettysburg.edu<
https://www.gettysburg.edu/>
________________________________
From:
dot...@googlegroups.com <
dot...@googlegroups.com> on behalf of Mark Pitely <
pit...@maryu.marywood.edu>
Sent: Thursday, April 29, 2021 11:48 AM
To:
dot...@googlegroups.com
Subject: Re: [dotcms] URL rewriting
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
One trick I use is hunting things down in the 404 page:
#set ($thispage=$request.getAttribute("javax.servlet.forward.request_uri"))
#if ($thispage.contains('/catalog'))
<meta http-equiv="Refresh" content="0; url=
http://marywood.smartcatalogiq.com/<
https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fmarywood.smartcatalogiq.com%2f&c=E,1,fQ8u0c3aS5uw7d-IyYIKTrBRuppbFqay-0UZqZoOkagGd_fBT1v0XYda2TJPDMc9mS6RivHuEbLWieWI0H_uz-N5tM9YiSuJO_-VhZYzCg,,&typo=1>" />
## alternatively you can: $response.sendRedirect($nrepath)
#end
I think you could also, in this case, make a structure of redirects and use the URLMap feature to match.
From your example, are you redirecting each and every one to the same place? I'd use the idea above.
But if each of those other links is supposed to map to a different place, you could absolutely use URL map and a structure to maname many calculated redirects.
Mark Pitely
Marywood University
On Thu, Apr 29, 2021 at 11:35 AM Mark Orciuch <
mark_o...@ngsltd.com<mailto:
mark_o...@ngsltd.com>> wrote:
Hello,
I am wondering if something like this is possible. I have some legacy urls coming from Google searches that need redirection. For example:
/portal/group/auditor/page/default -> /departments/auditor
/portal/group/treasurer/page/abc -> /departments/auditor
/portal/media-type/html/group/sheriff -> /departments/auditor
/portal/media-type/html/user/anon -> /departments/auditor
Tuckey URL rewrites is not an option to me.
I would settle for a redirect to "/departments" if what I'm trying to achieve is not possible. I tried Vanity URL like shown below but it's not working for me:
Uri: /portal/media-type/html/([A-Za-z0-9]+)
Forward To: /departments
Many thanks in advance for any hints.
--
http://dotcms.com<
https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,SkT1aHvXxhOFzzyZHC501zh4QNQowFCxXCKQtaWDyYyHoM8zcehj5O7tSNT7OvaBwtiQAc5YogMYW6Zy0XH52OGQTxMUJ95xxM5Y_YTBU0Q8l_7gNU7FEA,,&typo=1> - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com<mailto:
dotcms+un...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/4441dd5a-c8e8-4dd4-ad38-0eff448de9bfn%40googlegroups.com<
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2f4441dd5a-c8e8-4dd4-ad38-0eff448de9bfn%2540googlegroups.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,q9WeLrpanRaPbsAOhNXpwUCLUkO-wmcqL8Iq5xlnCmrUtoBMJpZcfzyCt0rcAr4tUgT1QP83LJlx35NJayWoZbdC3-FLKbRgBQyuz5RRoA,,&typo=1>.
--
http://dotcms.com<
https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fdotcms.com&c=E,1,evFbAzsP20rOszFPFThqs880E82wXjo7Wywiu9c33tZz3jWNtso42Ze0QbWoZQ9EhDkTNdtcHwpmPemx-EHjRGs2erGamF0tmPNUVbKTt3o0rpcaEg,,&typo=1> - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com<mailto:
dotcms+un...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/CAFeiKqOHjARfkKyNpf58rbXOSmYk2T4ttAqk%3Df5YDL94%2BJ%2Bv8A%40mail.gmail.com<
https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fdotcms%2fCAFeiKqOHjARfkKyNpf58rbXOSmYk2T4ttAqk%253Df5YDL94%252BJ%252Bv8A%2540mail.gmail.com%3futm_medium%3demail%26utm_source%3dfooter&c=E,1,Lx-bpR46F6boHjYeCqAIAPxPnWwTPQ2kAMqgCO-G4vE4hP2foUJja9QJ4dRLNmK3MiET7wWZxRLyMdvXH56Y8zGQzoSGZtVTF11-MWir_tQgoBsZOA,,&typo=1>.