Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Dispatcher configuration for contexthub breaks rewrite conditions for url

VasconcelosAqui
Level 3
Level 3

Hello guys.

We have the requirement to get our ContextHub work on publish and dispatcher, we found a way to do that by putting the following condition on our dispatcher:

RewriteCond %{REQUEST_URI} (default|tandt)\.html$

But when we got that this condition started to break our other URL treatments, for example, the links of type host.com/somelink/ that should work with base in our other rewrite conditions do not work anymore.

The previous Rewrite conditions that we were using were those ones:

RewriteCond %{REQUEST_URI} !^/apps

RewriteCond %{REQUEST_URI} !^/content

RewriteCond %{REQUEST_URI} !^/etc

RewriteCond %{REQUEST_URI} !^/home

RewriteCond %{REQUEST_URI} !^/libs

RewriteCond %{REQUEST_URI} !^/system

RewriteCond %{REQUEST_URI} !^/tmp

RewriteCond %{REQUEST_URI} !^/var

RewriteCond %{REQUEST_URI} !.html$

RewriteRule ^/(.*)$ /$1.html [PT,L]

If someone has the previous contact with that problem on dispatcher or some Idea of how to solve that problem please answer the question or contact me using the following mail aquila.vasconcelos@osf-global.com

1 Accepted Solution
Peter_Puzanovs
Correct answer by
Community Advisor
Community Advisor

Dear VasconcelosAquila,

Please consider the use of RewriteCond and sequencing in which you do put them.

Also remember to put correct rewrite flags that should allow you to achieve your goals[1].

[1] RewriteRule Flags - Apache HTTP Server Version 2.4

Regards,

Peter

View solution in original post

1 Reply
Peter_Puzanovs
Correct answer by
Community Advisor
Community Advisor

Dear VasconcelosAquila,

Please consider the use of RewriteCond and sequencing in which you do put them.

Also remember to put correct rewrite flags that should allow you to achieve your goals[1].

[1] RewriteRule Flags - Apache HTTP Server Version 2.4

Regards,

Peter

View solution in original post