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 ?

closed as too broad by 7ochem, Marius Feb 3 '17 at 23:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


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 Mar 20 '13 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.