Dispatcher configuration for contexthub breaks rewrite conditions for url | Community
Skip to main content
VasconcelosAqui
Level 2
July 16, 2019
Solved

Dispatcher configuration for contexthub breaks rewrite conditions for url

  • July 16, 2019
  • 1 reply
  • 2377 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Peter_Puzanovs

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

1 reply

Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
July 16, 2019

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