0

I have configured Amazon EC2 instance with Amazon Linux AMI 64 bit

and I have uploaded my website, whole code is working but issue with .htaccess

RewriteRule are not working. I have done all changes in httpd.conf file but I think it might be a permission issue.

please help me regarding this.

here is my htaccess code

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^friosworld\.com$ [NC]
RewriteRule ^(.*)$ http://www.friosworld.com/$1 [R=301,L]

and one more thing I have found via googling

httpd.conf file code

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

I think problem is in this block of code. but I don't know what is the problem!

I have also changed AllowOverride None to AllowOverride All but still not working!!

Sumit Bijvani
  • 8,154
  • 17
  • 50
  • 82

1 Answers1

0

Got the solution. thanks for your time.

<Directory />
    Options FollowSymLinks
    AllowOverride All  # AllowOverride None to AllowOverride All
</Directory>

AND

DocumentRoot "/home/mydirectory/website"  //change this default path to my path

Now its working fine

Thank you all

Sumit Bijvani
  • 8,154
  • 17
  • 50
  • 82
  • 1
    You should change your `` directive to `` otherwhise Apache will have to check all directories in your path on each request. – Michael Härtl Mar 22 '13 at 08:10