在url重写中ERR_CONNECTION_REFUSED

I am using AWS elastic beanstalk and have configure my htaccess as follow:

RewriteEngine On

RewriteRule ^category/([A-Za-z0-9-]+)/$ /searchPage.php?crs_category=$1 

The htaccess file is located at the root of the website, hence domain.com/.htaccess

the problem I now have is that the entire site doesn't work. nothing wrong in aws, health is green, but any page I load on the website says "ERR_CONNECTION_REFUSED" essentially what this rewriterule does it takes searchPage.php?crs_category=business for example and turn it to domain.com/category/business/

but not even the index.php is loaded or can be loaded.

Any help would be greatly appreciated.

P.S. this how Allowoverwide all was enabled in aws (using ebextensions, I created a config file):

files:          
  "/etc/httpd/conf.d/enable_mod_rewrite.conf": 
     mode: "644"
     owner: root
     group: root
     content: |
       AllowOverride All

but I don't think this where the error lies