I installed Fresh Magento in Live Server with a subdomain (shop.example.com)

And It given me error 500 : internal server error

But If i delete .htaccess the site works properly

Without .htaccess file magento project won't be running. So how to solve this ?

3 Answers 3


You've clearly got an error in your .htaccess file.

If you check your Apache error log, you should see a pointer as to where the error is exactly.


[Wed Mar 20 12:15:49 2013] [alert] [client] /home/chocoloo/public_html/.htaccess: Invalid command 'faulty_line', perhaps misspelled or defined by a module not included in the server configuration

There is also a chance the subdomain functionality you are using uses rewrites, in which case try setting

RewriteBase /
  • I added a .htaccess file in the "Global Directory .htaccess" area of cPanel It will used as global .htaccess of particular domain and its subdomains.
    – LuFFy
    Commented Mar 20, 2013 at 11:28

If you are using CGI mode for PHP (check phpinfo()), you must uncomment first two lines in your .htaccess file:

Action php5-cgi /cgi-bin/php5-cgi    
AddHandler php5-cgi .php

In my case it was lack of memory in PHP config.

Error was gone after adding to .htaccess line:

    php_value memory_limit 512M

Not the answer you're looking for? Browse other questions tagged or ask your own question.