Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Internal server error (500) due to server migration - htaccess  (Read 482 times)

risingSun

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Internal server error (500) due to server migration - htaccess
« on: September 20, 2012, 11:12:03 PM »

Hello guys,

I recently migrated server to godaddy and pointed my domain to that hosing account.

Site is hosted and can be accessed through www.newhosting.com/sites/mysite
Also home page can be accessed through my new domain www.mynewdomain.com which is primary address

But when i click any of the links on my home page through www.mynewdomain.com is says Internal server error The server encountered an internal error or misconfiguration and was unable to complete your request.

I suppose it have something to do with htaccess file but i don't understand those settings.
Here is my .htaccess file:
Code: [Select]
SetEnv TZ "europe/central"
<IfModule mod_php4.c>
    php_value session.use_trans_sid 0
</IfModule>
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
RewriteEngine On
#RewriteBase /snewsMU
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?category=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+) index.php?category=$1&title=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1&nbsp;articlespage=$2 [L]

What should I change?
« Last Edit: September 22, 2012, 12:09:33 AM by risingSun »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Internal server error (500) due to server migration - htaccess
« Reply #1 on: September 21, 2012, 05:15:34 PM »

This problem does not occur provided you are installing the sNews package in your domain root... usually your domain's public_html directory on your host server. However, if you create a new sub-directory in that root, and put your sNews installation in that sub-directory, then you DO need to make a change in your package's .htaccess file.

Find this string in the .htaccess file - #RewriteBase /snewsMU

1. The #-sign at the start of the string keeps the server from parsing it, which is fine when the package is in the domain root. When that isn't the case, we remove the #-sign to activate the string so that the server can find the package.
Remove the #-sign.

2. Next, replace snewsMU at the end of the string with the name(s) of any folder(s) you have added to your server's public_html directory... where your sNews package is located.
EXAMPLES:
- If your sNews package is located in a sub-directory (folder) named sites in your public_html directory...
   you would change snewsMU to sites.
- If your sNews package is located in a folder named mysite in the sites folder...
   you would change snewsMU to sites/mysite.

Be sure to let us know if this works for you.  :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Internal server error (500) due to server migration - htaccess
« Reply #2 on: September 21, 2012, 09:00:33 PM »

Also take the time to read the FAQ - scroll down the page and you'll see there are at least two items that could relate to your issue.
Logged

risingSun

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: Internal server error (500) due to server migration - htaccess
« Reply #3 on: September 21, 2012, 11:37:35 PM »

Find this string in the .htaccess file - #RewriteBase /snewsMU

1. The #-sign at the start of the string keeps the server from parsing it, which is fine when the package is in the domain root. When that isn't the case, we remove the #-sign to activate the string so that the server can find the package.
Remove the #-sign.

2. Next, replace snewsMU at the end of the string with the name(s) of any folder(s) you have added to your server's public_html directory... where your sNews package is located.

I tried writing full path from the hosting site root but with no success. I also tried several other paths  but nothing changed.

Finally i put - RewriteBase / and everything now works like a charm!

Thanks!

RESOLVED
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Internal server error (500) due to server migration - htaccess
« Reply #4 on: September 22, 2012, 04:55:44 PM »

Finally i put - RewriteBase / and everything now works like a charm!
Thanks!
RESOLVED

Glad to see you have it resolved. Enjoy.  :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU