Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Dec 14, 2017 Dec 14, 2017

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

3.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2017 Dec 15, 2017
LATEST

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!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines