Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Site is

After migration to a different server its not opening "500 Internal Server Error"

My Base location is "/home/odisha/public_html"

Below is my .htaccess file

php_flag magic_quotes_gpc off

# enable apache morRewrite module #
RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

#Google and Yahoo sitemap
RewriteRule ^sitemap.xml$ /plugins/sitemap/sitemap.php?search=google [QSA,L]
RewriteRule ^yahoo-sitemap.txt$ /plugins/sitemap/sitemap.php?search=yahoo [QSA,L]
RewriteRule ^urllist.txt$ /plugins/sitemap/sitemap.php?search=urllist [QSA,L] 

# define system languages
RewriteRule ^([^//]+)/?(.{2})?/$ index.php?page=$1 [QSA,L]

# define paging
RewriteRule ^([^//]+)/?(.*)?/index([0-9]*).ht(m?ml?)$ index.php?page=$1&rlVareables=$2&pg=$3 [QSA,L]

# define listing
RewriteRule ^([^//]+)/(.*)-l([0-9]*).ht(m?ml?)$ index.php?page=$1&rlVareables=$2&listing_id=$3 [QSA,L]

# define single pages
RewriteRule ^([^//]+)/?(^/*)?.ht(m?ml?)$ index.php?page=$1 [QSA,L]

# define other pages
RewriteRule ^([^//]+)/?(.*)?/?(.*)?(.ht(m?ml?)|/+)$ index.php?page=$1&rlVareables=$2 [QSA,L]
share|improve this question

migrated from Sep 4 '11 at 20:44

This question came from our site for professional and enthusiast programmers.

Do you have access to the server's error logs? – Pekka 웃 Sep 4 '11 at 8:22
yes I have access – SASHI Sep 4 '11 at 8:23
Did you verify whether the error is caused by your .htaccess? Did you uncomment the first line for testing? – str Sep 4 '11 at 8:23
There must be. A 500 is always logged somewhere. Are you sure you have the right file? – Pekka 웃 Sep 4 '11 at 8:29
you are looking in the wrong log then. There is an error somewhere. – gview Sep 4 '11 at 8:31

Try getting rid of

php_flag magic_quotes_gpc off
share|improve this answer
Meisam Mulla - My first thought was "WTF"? But you're right: that "php_flag" line doesn't belong in an .htaccess file - it could well be the whole problem! Good call! – paulsm4 Sep 4 '11 at 18:32


  1. Substitute a simple "hello world" .html file in the root; see if you can open that.

  2. If you can display a minimal .html file, then try a .php file containing only "phpinfo ();". Make sure that displays. Make sure all the things you need (for example, mysql support) are enabled in your PHP/Apache environment.

  3. Look at your http error log. There's almost certainly an error there. Honest.

  4. Also look at your http access log and operating system logs, too. They might give additional clues.

  5. Failing all else, modify php.ini to enable verbose logging.

  6. Do NOT worry about .htaccess until you're certain it's the culprit.

  7. I suspect you'll find the actual problem somewhere before you even get to step 4).

Good luck!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.