0

I have created a new C9 AWS instance, and my .htaccess file is being ignored.

Here are the file contents:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]

Here is what I have done:

  • I have changed my httpd.conf to Allow All.
  • I have restarted the server after making changes to httpd.conf file
  • I have tried putting garbage in the .htaccess file to test it
  • I have changed the default directory to match what runs in c9

Here is a picture of my httpd.conf:

enter image description here

Any help with this would greatly be appreciated!

drummer392
  • 473
  • 2
  • 8
  • 35

2 Answers2

0

Please check as you need to change the file from following location as a root user:

sudo nano /etc/httpd/conf/httpd.conf
Yash Bindlish
  • 560
  • 5
  • 15
0

I ended up doing two things to fix this issue:

  1. Changing the listening port in the httpd.conf to 8080
  2. Chmod all directories to 755 find /home/ec2-user/ -type d -exec chmod 755 {} +
drummer392
  • 473
  • 2
  • 8
  • 35