PDA
View Full Version : .htaccess 500 Internal Server Error
I'm trying to use a .htaccess file and every time I get a 500 server internal error.
I use the same .htaccess on my other host just fine. I thought .htaccess was allowed on paid accounts ? Any tips would be appreciated.
slyvion
04-11-2008, 06:52 AM
you cant use .htaccess read some of the stickys they will help you.
you cant use .htaccess read some of the stickys they will help you.
http://forum.unlimitedmb.com/showthread.php?t=2391&highlight=htaccess
We will probably add them to the control panel soon.
However noth these functions are already possible:
1. use ftp to move files
2. can be done on paid accounts with htaccess
I did read and read, then I read more.
UnlimitedMB
04-11-2008, 07:12 AM
It means you have made a mistake in your code.
Thanks for the reply.
I am using this site to make the code
http://www.tools.dynamicdrive.com/password/
These are the codes I'm using for each file
.htaccess
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /members/files/.htpasswd
AuthGroupFile /dev/null
require valid-user
.htpasswd
username1:11qUL4NWjGdI2
UnlimitedMB
04-11-2008, 03:43 PM
I tried those two files and it works fine for me, i get the password prompt.
Make sure you have the AuthUserFile path set right, or just leave it out completely.
a safer way would be
AuthName "Restricted Area"
AuthType Basic
AuthUserFile .htpasswd
require valid-user
If you use a path remember it is a full path not relative.
ie "AuthUserFile /members/files/.htpasswd" is incorrect
"AuthUserFile /hosted/subs/ulmb/....../members/files/.htpasswd" is correct.
Thanks got it working. How do you go about hiding a few files ? such ass the .htaccess, .htpasswd, , .txt and the index.php ?
I tried adding this to the .htaccess
IndexIgnore .htaccess
IndexIgnore .htpasswd
IndexIgnore .txt
IndexIgnore index.php
Thanks again
slyvion
04-11-2008, 08:37 PM
hmm so you can use .htaccess
UnlimitedMB
04-11-2008, 10:31 PM
All files are already hidden (directory indexes are turned off) so IndexIgnore will do nothing.
The server prevents anyone from downloading .htaccess or .htpasswd files.
Thanks, but I know htey can't downloaded or anything. But theres no way to have them not shown on an index ? Cause I see them on mine. No big deal, just trying to make it as clean as possible. Thanks again.
UnlimitedMB
04-13-2008, 01:42 AM
The reason you see that index is because you have a htaccess file which is enabling the indexes, the default is disabled, you need to remove those commands.
Do not upload any htaccess files that come with downloaded php scripts, only upload ones you know you need.
usmranks
04-14-2008, 10:11 PM
Hi. I didn't make a separate topic because the subject of my problem is the same as the original in this thread. I'm also getting the 500 Internal Server Error with .htaccess. I do have a paid account. I copied the files exactly from what was posted earlier in this thread, and only changed the .htapasswd file, but it's still not working? Did I do something wrong?
UnlimitedMB
04-15-2008, 01:40 AM
Did you copy the non working sample or the one I posted?
usmranks
04-15-2008, 11:30 PM
The one you posted.
usmranks
04-17-2008, 10:07 PM
Hello? Still not working.. =\
UnlimitedMB
04-17-2008, 10:42 PM
The code i posted was specific to that customers request.
Please dont just copy it without understanding this.
The 500 error was already explained that its a bug in your code.
usmranks
04-17-2008, 10:47 PM
Mine was originally the same as that user's, so I assumed I should change it to the same one you posted for them since it appeared to be the same problem. I don't understand what's wrong with whatever I'm doing.
UnlimitedMB
04-18-2008, 12:44 AM
What is the url where you get the error?
usmranks
04-18-2008, 12:49 AM
http://usmranks.com/test/index.html
UnlimitedMB
04-18-2008, 12:55 AM
You have all the commands on one line, mixed with corrupted characters.
Copy it exactly as its displayed, one command per line, save a a regular text file.
Here is what you have
AuthName "Restricted Area" ^MAuthType Basic ^MAuthUserFile .htpasswd ^Mrequire valid-user
usmranks
04-18-2008, 01:31 AM
Ah, thanks for pointing that out. It appears fine in my text editor, but I've had that problem before. When you mentioned it was on one line, I realized that must be it. I've gotten it all working - thanks for your help!
usmranks
05-01-2008, 10:00 PM
I'm having this problem again. Not sure if it's still the thing with everything on one line. Now I'm using Notepad, so it shouldn't be that issue again.
http://usmranks.com/contact/index.php
UnlimitedMB
05-01-2008, 11:05 PM
This is not a server problem.
We do not provide support for programming issues.
The problem is that you have some corruption or special/formatting characters in the first few bytes of what should be a plain text file.
vBulletin® v3.8.4, Copyright ©2000-2011, Jelsoft Enterprises Ltd.