Skip to main content
Participant
December 15, 2017
Question

How to redirect 403 forbidden request to 404 page in AEM??

  • December 15, 2017
  • 1 reply
  • 3587 views

down votefavorite

I have tried to redirect all forbidden request to 404 'not found' page. Url whih I am trying to access is :: http://localhost:4503/content/mysite/home.html (it is working fine). But when I try to access,http://localhost:4503/content/mysite (it is forbidden here). I have developed the site in adobe experience manager and I don't see any config/setting related with redirecting. So, I have to do something on web server which is Apache here. And I am not pretty much familiar with Apache and creating rules in it. I would like to ask if there is anything that redirect any forbidden request to 404 not found

This topic has been closed for replies.

1 reply

BenPleysier
Community Expert
Community Expert
December 15, 2017

Create a file named .htaccss in the root directory and add the following lines

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ - [L,R=404]

For more info, Google .htaccess. To start you off, have a look at https://www.digitalocean.com/community/tutorials/how-to-use-the-htaccess-file

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!