Expand my Community achievements bar.

SOLVED

Apache mod rewrite before the page hits dispatcher

Avatar

Community Advisor

Hi,

 

Is it possible to ask Apache mod_rewrite to rewrite the page url before it hits the dispatcher ?

 

E.g. make "?" a ".".

E.g some/url/that/is/not/caches?becouseof=this would become some/url/that/is//cached.becouseof.this

http://helpx.adobe.com/experience-manager/kb/DispatcherModReWrite.html did not seem to work is there a better documentation ?

Thanks,

Peter

1 Accepted Solution

Avatar

Correct answer by
Level 8

There are lots of reasons a rewrite rule might fail to be applied to an incoming request. The article you referenced has all the AEM/Dispatcher specific reasons why a rewrite rule might fail to be applied. Have you turned up the debug level for mod_rewrite to see what it thinks is happening. It's possible that you have applied your rewrite rule in wrong element in httpd.conf for example or that there is some error in your regular expression and looking at the debug output from mod_rewrite will help identify these issues. 

View solution in original post

4 Replies

Avatar

Employee

Don't forget to set the dispatcherUseProcessedURL flag in your httpd.conf file. 

Avatar

Correct answer by
Level 8

There are lots of reasons a rewrite rule might fail to be applied to an incoming request. The article you referenced has all the AEM/Dispatcher specific reasons why a rewrite rule might fail to be applied. Have you turned up the debug level for mod_rewrite to see what it thinks is happening. It's possible that you have applied your rewrite rule in wrong element in httpd.conf for example or that there is some error in your regular expression and looking at the debug output from mod_rewrite will help identify these issues. 

Avatar

Level 5

PuzanovsP wrote...

Hi,

 

Is it possible to ask Apache mod_rewrite to rewrite the page url before it hits the dispatcher ?

 

E.g. make "?" a ".".

E.g some/url/that/is/not/caches?becouseof=this would become some/url/that/is//cached.becouseof.this

http://helpx.adobe.com/experience-manager/kb/DispatcherModReWrite.html did not seem to work is there a better documentation ?

Thanks,

Peter

 

Hi,

In case you want to make your page cachable with query parameters, You can configure you dispatcher.any file with ignoreurlsparams section. You can refer this https://forums.adobe.com/message/4930557#493055 .

Thanks