How To Fix Mod_rewrite 500 Internal Server Error On .htaccess File Apache

RegisterLogin
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
Tags: How, To, Fix, Mod_rewrite, 500, Internal, Server, Error, On, .htaccess, File, Apache
This Post Was Posted On Nov 01, 2010 By web hosting #2095
are you getting the infamous 500 error on your website? it can be difficult to figure out what the problem is,

start with the basics.. the most frequent mistake is MISSPELLING, so check your spelling. Webune recommends that you check word by word to be sure you have not mispelled a command. (for example, did you noticed i misspelled the word 'mispelled' it should be 'misspelled' so if you dont pay attention, it can be easy to make spelling errors)

then the most common mistake is the syntax - make sure you have the correct syntax for the commands in the .htaccess file works -

third, is probably means that you are getting this error because you dont have the feature you are trying to run on the htaccess file.

for example today, i wanted to start making my urls more search engine friendly (SEO) with apache mod rewrite, 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
Lamp
#5357 1
the apache httpd server

is a powerful, flexible, http/1.1 compliant web server implements the latest protocols, including http/1.1 (rfc2616) is highly configurable and extensible with third-party modules can be customised by writing 'modules' using the apache module api provides full source code and comes with an unrestrictive license runs on windows nt/9x, netware 5.x and above, os/2, and most versions of unix, as well as several other operating systems is actively being developed encourages user feedback through new ideas, bug reports and patches

Aug 02, 2011 Reply Report abuse
nope
#5341 2
didn't do anything
Jul 23, 2011 Reply Report abuse
newbie
#5337 3
hi guys,

i solved my problem by configuring the .htaccess file

i simply wrote

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

many thanks for your help
Jul 21, 2011 Reply Report abuse
sojan
#5249 4
it really helped, no more error but the url didnt changed
Jun 06, 2011 Reply Report abuse
akobasiako
#5233 5
enabling apache mod_rewrite on joomla for search engine optimization (seo) to get search engine friendly urls (wamp)

steps to do that:
1. go to the global configuration > site tab at the backend of your joomla site and set
the search engine friendly urls to "yes". but before setting the apache
mod_rewrite to "yes". do the step 2 - 5 first.
2. go to your joomla root directory "c:\wamp\www\joomla\"
3. open the htaccess.txt file and copy the whole content.
4. open the notepad and paste all the contents from htaccess.txt.
5. save the file as ".htaccess" to do this. click file in menu options,
hit save as then choose all files and type ".htaccess" then save it..
6. now set the apache mod_rewrite to "yes"

restart the apache service and that's it.. you have then enabled the sef urls..

if you encountered the internal server error see the article below.

wamp server and .htaccess problem

click on wamp icon, then apache, then httpd.conf file, it will open in notepad.
or
follow th
May 29, 2011 Reply Report abuse
No
#4853 6
how do you fix this error it causes your backend to go down, too?

i can't get to htaccess to fix it!!
Feb 21, 2011 Reply Report abuse
Paul
#4821 7
for me works with your changes in .htaccess file.thanx for share.
Feb 08, 2011 Reply Report abuse
NoName
#4751 8
not work..
Jan 11, 2011 Reply Report abuse
Liam
#4583 9
did not help, sorry :(
Oct 30, 2010 Reply Report abuse
Mercedes
#4580 10
thank you!!!! i love you for this:)
Oct 29, 2010 Reply Report abuse
max
#4269 11
thas good job how about 404 page not found error? anyone have any idea? i use nulled script which use this rewrite mode :)
Jul 29, 2010 Reply Report abuse
jiki
#3926 12
i have web4ce .htaccess joomla

does any know how to solve this?
May 04, 2010 Reply Report abuse
jamesi
#3456 13
the server encountered an internal error and was unable to complete your request htaccess joomla
Feb 13, 2010 Reply Report abuse
kivonletski
#3298 14
web4ce mod_rewrite joomla internal server error
Jan 21, 2010 Reply Report abuse
helver..UK
#3245 15
can you use .htaccess with mamp to avoid this 500 error?
Jan 12, 2010 Reply Report abuse
View More Comments
Leave Your Comments...
©2011 Webune Forums - Sun Dec 18, 2011 2:34 pm
Powered by: Webune Forums V3