AEM Dispatcher MOD Rewrite Not Working | Adobe Higher Education
Skip to main content
Level 5
October 9, 2022
Beantwortet

AEM Dispatcher MOD Rewrite Not Working

  • October 9, 2022
  • 4 Antworten
  • 2639 Ansichten

Hello Team,

 

We just setup dispatcher in local Window 10 Machine.

 

Apache Version:

Dispatcher Module downloaded from Adobe download console.

 

Dispatcher setup is done successfully. Pages are getting cached/invalidate after replication.

 

1)Filter rules work fine as well.

2)This is Virtual Host:

 

When we try to hit http://vm.local/content/weretail/us/en.html. It works fine

3) Entry in host file:

127.0.0.1 localhost
127.0.0.1 vm.local
127.0.0.1 vm.locall

 

Only Problem is :

 

Below is the link for Apache file along with All Configured Dispatcher files.

https://github.com/digi108/aem-disp-window/blob/main/Apache2.2.zip

 

We are not able to make rewrite working. When we try to hit http://vm.local, It does not redirect at all and gives us 404.

Below is our rewrite rules:

 

 

 

 

Regards,

KTNR

 

 

 

 

 

 

 

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von arvind-1

Hello All,

 

Thanks a lot for your support, Found root cause.

 

Under enabled_hosts, there were 2 different vhost taking priority before our real vhost. Now it is properly adjusted and fixed. Thanks.

4 Antworten

Shashi_Mulugu
Community Advisor
Community Advisor
October 10, 2022

@arvind-1 have you enabled Mod_rewrite module in httpd.conf?

https://ubiq.co/tech-blog/how-to-enable-mod_rewrite-in-xampp-wamp/ 

Level 5
October 10, 2022

Hi @shashi_mulugu ,

 

It is one of the first thing, I did during setup. Mod:rewrite is enabled already.

 

https://github.com/digi108/aem-disp-window/blob/main/Apache2.2.zip

Siva_Sogalapalli
Community Advisor
Community Advisor
October 11, 2022

Hi @arvind-1 

 

In the above rules, i see the rewrite Rule is commented. did you try by uncommenting the rewrite rule?

RewriteEngine on
RewriteRule   "^/$"  "/content/we-retail.html"  [R]

Also you can check more rules here:  https://httpd.apache.org/docs/2.4/rewrite/remapping.html

Level 5
October 11, 2022

Hi Siva,

 

Thank you for kind reply. Other rules are not commented.

 

BTW, It seems flow does not come till this rewrite rules file somehow.

Level 5
October 15, 2022

@kautuk_sahni , Any help/suggestion pls 🙂

Shashi_Mulugu
Community Advisor
Community Advisor
October 15, 2022

Can you post your httpd conf which includes vhost file and vhost file where you included your rewrite file?

Level 5
October 15, 2022
arvind-1AutorAntwort
Level 5
October 15, 2022

Hello All,

 

Thanks a lot for your support, Found root cause.

 

Under enabled_hosts, there were 2 different vhost taking priority before our real vhost. Now it is properly adjusted and fixed. Thanks.