How To Fix mod_rewrite 500 Internal Server Error on .htaccess file Apache

Mobile
feeds
Welcome Login | Register

How To Fix mod_rewrite 500 Internal Server Error on .htaccess file Apache
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » Linux Forums
        » » 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 Linux
Post Tags:
This Post Has Been Viewed 8693 Times Since Mon Jan 15, 2007 6:10 pm Author hostman with 15 replies
How To Fix mod_rewrite 500 Internal Server Error on .htaccess file Apache
Advertise On This Page




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.


Leave Your Comments

Share:   Subscribe - Keep Up With This Topic
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
Fourms BBCODE:
Links Related to : How To Fix mod_rewrite 500 Internal Server Error on .htaccess file Apache
Add Link:

Comments and replies About How To Fix mod_rewrite 500 Internal Server Error on .htaccess file Apache
:: 1 :: Reply #6722 Reply By Tanuja On Fri Jun 15, 2007 3:02 am
Tanuja:
thanks a lot for this post. really helped.
:: 2 :: Reply #67390 Reply By teo On Wed Aug 20, 2008 12:06 pm
teo:
you saved my day!!!!!
thanks a lot!!!
:: 3 :: Reply #69289 Reply By RnS On Thu Sep 04, 2008 1:38 am
RnS:
i did same changes above but it did not worked for me....:(
:: 4 :: Reply #75158 Reply By Christian On Sun Oct 12, 2008 1:14 pm
Christian:
bit of a bandaid solution eh? great for the people who do not want to use the followsymlinks option, but what about the people that do?
:: 5 :: Reply #79953 Reply By naryano On Sat Nov 08, 2008 2:30 am
naryano:
thank u very match

i maked that on my web site and now working fine

fnon-des
:: 6 :: Reply #79982 Reply By Christoph Burgdorfer On Sat Nov 08, 2008 9:19 am
Christoph Burgdorfer:
you have to enable overriding: "allowoverride all" in your apache configuration for the respective domain to fix the problem.
:: 7 :: Reply #80208 Reply By naryano On Sun Nov 09, 2008 1:45 pm
naryano:
thank u very match

i maked that on my web site and now working fine

www.fnon-des.
:: 8 :: Reply #82034 Reply By Khaled On Wed Nov 19, 2008 6:30 am
Khaled:
thankssssssssssssssss
:: 9 :: Reply #86638 Reply By Dani On Thu Dec 18, 2008 4:27 am
Dani:
fantastic solution!

thank you so very much from barcelona,spain ;)
:: 10 :: Reply #88466 Reply By 50742k On Fri Jan 02, 2009 3:57 am
50742k:
great!!! so much thanks and greetings from mexico city, but i have one more trouble, rewrite doesn't work :'(

it redirect me at 404 page :(

my .htaccess code is:


rewriteengine on
rewriterule ^profile/(.*)$ profile.php?dirid=$1 [l,nc]
:: 11 :: Reply #88974 Reply By Jennifer On Mon Jan 05, 2009 7:24 pm
Jennifer:
seems to have worked! your awesome!
:: 12 :: Reply #89535 Reply By vbulletins On Sat Jan 10, 2009 7:55 pm
vbulletins:
i have htaccess file gives internal error 500 vbulletin forums can you help
:: 13 :: Reply #98651 Reply By nboarch On Sun Mar 29, 2009 12:05 pm
nboarch:
hello i was attempting to use mod rewrite on uniserver but got 500 internal server error does that mean my apache mod re write module is not working for me. and how do i need to install it to fix this proble?
:: 14 :: Reply #99250 Reply By chami On Fri Apr 03, 2009 11:24 pm
chami:
nice & clear article.helped me to solve my problem
:: 15 :: Reply #106134 Reply By mystix2112 On Sat Jun 13, 2009 7:15 am
mystix2112:
the perblerm is permisson or the perl is
not running right if you are using perl
the scripts will no load read /var/
is where the log are