AEM Dispatcher MOD Rewrite Not Working | Community
Skip to main content
New Participant
October 9, 2022
Solved

AEM Dispatcher MOD Rewrite Not Working

  • October 9, 2022
  • 4 replies
  • 2636 views

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

 

 

 

 

 

 

 

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 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 replies

arvind-1AuthorAccepted solution
New Participant
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.

arvind-1Author
New Participant
October 15, 2022

@kautuk_sahni , Any help/suggestion pls 🙂

Shashi_Mulugu
New Participant
October 15, 2022

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

arvind-1Author
New Participant
October 15, 2022
Siva_Sogalapalli
New Participant
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

arvind-1Author
New Participant
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.

Shashi_Mulugu
New Participant
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/ 

arvind-1Author
New Participant
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