Dispatcher rule or another solution | Community
Skip to main content
Level 2
August 6, 2025

Dispatcher rule or another solution

  • August 6, 2025
  • 4 replies
  • 602 views

Greetings,

Our client has asked us to shorten a url, the request is as follows, the full path to the url would be 
www.example.com/check-in-external-root/check-in-external

content/tib/de/check-in-external-root/check-in-external

 

Now, we have tried a few things,

RewriteCond %{HTTP_HOST} ^(.*)example.com$
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/content/dam
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/(.*).jpeg
RewriteCond %{REQUEST_URI} !^/(.*).json
RewriteCond %{REQUEST_URI} !^/(.*).png
RewriteCond %{REQUEST_URI} !^/(.*).html
RewriteCond %{REQUEST_URI} !^/(.*).pdf
RewriteCond %{REQUEST_URI} !^/(.*).mp4
RewriteCond %{REQUEST_URI} !^/(.*).xml
RewriteCond %{REQUEST_URI} !^/en/(.*)
RewriteRule ^/check-in-external$ /content/tib/de/check-in-external-root/check-in-external [PT,L]
or
RewriteCond %{HTTP_HOST} ^(.*)example.com$
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/content/dam
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/(.*).jpeg
RewriteCond %{REQUEST_URI} !^/(.*).json
RewriteCond %{REQUEST_URI} !^/(.*).png
RewriteCond %{REQUEST_URI} !^/(.*).html
RewriteCond %{REQUEST_URI} !^/(.*).pdf
RewriteCond %{REQUEST_URI} !^/(.*).mp4
RewriteCond %{REQUEST_URI} !^/(.*).xml
RewriteCond %{REQUEST_URI} !^/en/(.*)
RewriteRule ^/check-in-external$ /content/tib/de/check-in-external-root/check-in-external.html [PT,L]
also 
RewriteCond %{HTTP_HOST} ^(.*)example.com$
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/content/dam
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/(.*).jpeg
RewriteCond %{REQUEST_URI} !^/(.*).json
RewriteCond %{REQUEST_URI} !^/(.*).png
RewriteCond %{REQUEST_URI} !^/(.*).html
RewriteCond %{REQUEST_URI} !^/(.*).pdf
RewriteCond %{REQUEST_URI} !^/(.*).mp4
RewriteCond %{REQUEST_URI} !^/(.*).xml
RewriteCond %{REQUEST_URI} !^/en/(.*)
RewriteRule ^/check-in-external/?$ /content/tib/de/check-in-external-root/check-in-external.html [PT,L]

or simply
RewriteCond %{HTTP_HOST} ^(.*)example.com$
RewriteRule ^/check-in-external$ /content/tib/de/check-in-external-root/check-in-external.html [PT,L]

We sadly need the root page, so removing it is not an option
None of them have worked so far, is there a way through dispatcher or etc/maps to accomplish this?

Thanks in advance!

Best Regards,
Daniel

4 replies

Level 2
August 6, 2025

Correction
the shorter one was tested like this

RewriteCond %{HTTP_HOST} ^(.*)example.com$
RewriteRule ^/check-in-external/?$ /content/tib/de/check-in-external-root/check-in-external.html [PT,L]

AMANATH_ULLAH
Community Advisor
Community Advisor
August 6, 2025

@danielma63 
This rule looks fine

Can you check if there are any other conflicting rules placed above these rules in dispatcher


Amanath Ullah
Level 2
August 7, 2025

Greetings,

Will search more thoroughly, i have not been able to see and there should not be any conflicting rules, check-in-external-root is a completely new page.

 

Best Regards,
Daniel

MukeshYadav_
Community Advisor
Community Advisor
August 6, 2025

Hi @danielma63 ,
You may try below generic rule

RewriteRule ^/check-in-external/(.+)$ /content/tib/de/check-in-external/$1.html [PT,L,QSA]


Thanks

Level 2
August 7, 2025

Greetings,

This suggestion did not work, anything else we could try?

Best Regards,

Daniel

Tanneru
August 10, 2025

Hello, 

In vhost file using substitute trim path which don’t want to expose to the public and In rewrites file use conditional at then of the file with the same substitute path .

 

Hope it would be helpful. Let me know if you need any syntax .

kautuk_sahni
Community Manager
Community Manager
September 1, 2025

@danielma63 just checking in! Were you able to get this resolved? If one of the replies above helped—whether it completely solved the issue or simply pointed you in the right direction—marking it as accepted can make it much easier for others with the same question to find a solution. And if you found a different way to fix it, sharing your approach would be a great contribution to the community. Your follow-up not only helps close the loop but also ensures others benefit from your experience. Thanks so much for being part of the conversation!

Kautuk Sahni