How To Fix Mod_rewrite 500 Internal Server Error On .htaccess File Apache
how to fix mod_rewrite 500 internal server error on .htaccess file apache
how, to, fix, mod, rewrite, 500, internal, server, error, on, htaccess, file, apache
How To Fix Mod_rewrite 500 Internal Server Error On .htaccess File Apache
Post Description: how to fix mod_rewrite 500 internal server error on .htaccess file apache
POST# 929
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: How To Fix Mod_rewrite 500 Internal Server Error On .htaccess File Apache
ok, so today, i wanted to start making my urls more search engine friendly (SEO), i wrote my .httaccess file and made the changes on my files to make sure the urls are as i put them in the .htacess file. when i tried to open my urls, i kept getting this Apache 500 error:








     Code:
Internal Server Error



The server encountered an internal error or misconfiguration and was unable to complete your request.



Please contact the server administrator, webmaster @example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.



More information about this error may be available in the server error log.



Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.0 Server at thisdomain.com Port 80




I remember a whie back ago i got this same error on another apache server. so what i had to do was look at the /etc/httpd/conf/httpd.conf file make sure i uncomment the mod_rewrite, so i logged into the linux shell and opened the httpd.conf file:




     Code:
nano /etc/httpd/conf/httpd.conf


When i open it, found that the mod_rewrite was not commented out, so wha else could be the problem, as you can see,

LoadModule rewrite_module modules/mod_rewrite.so the is not commented out in the httpd.conf file:






     Code:


LoadModule speling_module modules/mod_speling.so

LoadModule userdir_module modules/mod_userdir.so

LoadModule alias_module modules/mod_alias.so

LoadModule rewrite_module modules/mod_rewrite.so

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

LoadModule proxy_ftp_module modules/mod_proxy_ftp.so

LoadModule proxy_http_module modules/mod_proxy_http.so

LoadModule proxy_connect_module modules/mod_proxy_connect.so





so what else could be the problem i wondered...

Then i checked for AlloweOverride :




     Code:
<Directory />

Options FollowSymLinks

AllowOverride None

</Directory>





I changed AllowOverride from None to All, rebooted the server and i still kept getting the 500 error. at this point i was breaking my head..

so i checked my .htaccess file again to make sure i didn't make a typo or something, so this is how my .htacces files looks like:




     Code:
Options +FollowSymLinks

RewriteEngine on

RewriteRule ^p-([0-9]*).html viewpage.php?id=$1




So i removed the Options +FollowSymLinks then uploaded it my site, and voala! i didn't get the error anymore. so this is how my .htaccess file looks like now:




     Code:
RewriteEngine on

RewriteRule ^p-([0-9]*).html viewpage.php?id=$1




Thanks to the support team at www.webune.com for helping me with this problem, i had read a post regarding this on this fourm but could not get a resolution on the problems.



Thanks Webune for your support on my dedicated server. - that's what i call service.


Fri Jun 15, 2007 3:02 am
1
Tanuja
Reply #1673
thanks a lot for this post. really helped.

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload
     
  1. How To Test Linux Apache Mod_rewrite Working
  2. What Is Mod_rewrite? Apache Module Mod_rewrite - URL Rewriting Engine
  3. Learn How To Use Apache Module Mod_rewrite Explained
  4. Enable Mod Rewrite - Howto Steps Guide Tutorial
  5. How To Test Check If Mod_rewrite Is Enabled
  6. Web Hosting With Apache Mod_rewrite Enabled
  7. How To Fix Mod_rewrite 500 Internal Server Error On .htaccess File Apache
  8. Apache Server Mod_rewrite Explain
  9. Web Hosting With Apache Mod Rewrite Enabled
  10. Learn-how-to-use-apache-module-mod-rewrite-explained-p350
  11. Testing If Mod_rewrite Is Working
  12. Mod Rewrite On Iplanet And Sun One Web Server
  13. How To Test Mod Rewrite In Apacher Server
  14. How To Check If .htaccess Is Working
  15. Mod_rewrite Apt-get
  16. Mod_rewrite Working
  17. Mod Rewrite Script