Expand my Community achievements bar.

SOLVED

Dispatcher configuration for contexthub breaks rewrite conditions for url

Avatar

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

Avatar

Correct answer by
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

Avatar

Correct answer by
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