RedirectMatch 403 \[ not working with Inmotion

Avatar
  • Answered
At the top my .htaccess file I have the directive: RedirectMatch 403 \[

This helps to prevent server attacks. This works in my local development environment. www.mysite.dev/[ returns a 403 response header and shows the default "access denied" page from my web server.

However, if I upload the same .htaccess file to my production account on Inmotion, www.mysite.org/[ return a 404 error and directs users to my 404 page. I don't want this to happen. I want it to return the actual 403 error. Why is Inmotion interpreting my .htaccess file differently?

My website is a Wordpress site, if that helps with info. THanks!


Avatar
Arn
Hello Accessgroup,

The error you're getting requires that you specify either an error message (in the .htacces file) or a file for the error message. This is the reason that you're seeing a 404, because it presently doesn't have a defined error page to which must pointed. You can either create it manually or add the message to the .htaccess file.

If you have any further questions, please contact technical support or leave a comment at the bottom of the page.

Regards,

Arnel C.