I have an AEM project, which is running on Apache web server. I got an requirement to add .htaccess file at some directory location (page path). Need to know as if where this .htaccess file should be written.
I had gone through the documentations on Adobe and also followed sample WKND project.As per my assumptions, .htaccess files are not present in AEM dispatcher setup and we need to add those lines of code inside vhost file for the specific website. I know, it could be a general and silly question - but, need to know and any guidance will be appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
1. We can create the .htaccess file under /etc/httpd/conf.d directory as a file
(by using this command -> htpasswd -c /etc/httpd/conf.d/dispatcher.htaccess user) or
2. Create a directory called htaccess under /etc/httpd/conf.d and keep all the .htaccess files under htaccess directory.
(by using this command -> htpasswd -c /etc/httpd/conf.d/htaccess/dispatcher.htaccess user)
Make sure to add the .htaccess file path in the virtual-host section.
please refer these articles:
https://www.albinsblog.com/2021/09/how-to-enable-basic-authentication-for-aem-and-cloudmanager.html
https://www.albinsblog.com/2015/06/enabling-basic-authentication-for-adobecq5-adobeaem.html
1. We can create the .htaccess file under /etc/httpd/conf.d directory as a file
(by using this command -> htpasswd -c /etc/httpd/conf.d/dispatcher.htaccess user) or
2. Create a directory called htaccess under /etc/httpd/conf.d and keep all the .htaccess files under htaccess directory.
(by using this command -> htpasswd -c /etc/httpd/conf.d/htaccess/dispatcher.htaccess user)
Make sure to add the .htaccess file path in the virtual-host section.
please refer these articles:
https://www.albinsblog.com/2021/09/how-to-enable-basic-authentication-for-aem-and-cloudmanager.html
https://www.albinsblog.com/2015/06/enabling-basic-authentication-for-adobecq5-adobeaem.html