Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

htaccess fails to work, could something be wrong?

how can I test?



2:46 am on Dec 23, 2004 (gmt 0)

10+ Year Member

Well I'm not unexperienced to what htaccess files are capable of, but that being said I am not experienced in them and am confused on what would cause a htaccess file not to work.. and even then if it is server related or a syntax error on my part?

I've tried various things, and just did a test to turn indexing ON in a known directory.. in my .htaccess file I merely had:

Options Indexes

Nothing, still getting 403 error.. As well in a directory which did have it automaticly on, tried:

Options -Indexes

Yet no changes. So again, I'm a bit clueless on what aproach to take. What could cause a htaccess file not to operate? What would be the best way to test things?

My master goal is to develop a restriction over a region (downloadable files) that can only be accessed if coming from a PHP file.


3:49 am on Dec 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

One of the best pieces of advice jdmorgan gave me when I asked a similar question was to test the file one line at a time until I found the cause.

He also suggested cranking up the font size so it was easier to see errors.

I cranked up to large font but it took testing a few lines at a time before I finally found the cause. Of course, it was a silly stupid typo in an area of the file I was sure was ok.


5:38 am on Dec 23, 2004 (gmt 0)

10+ Year Member

Umm ok.. but (scratches head).. I don't retreive any error messages. Whenever I upload a htaccess file to *location*... it will still act as if I never uploaded the file in the first place. And as far as one at a time. When there is only one line to start with that confuses me even further.

Does htaccess require any sort of tags or such? Or does for example "Options -Indexes" nothing more nothing less all it takes? Which is only a file 16 bytes in size.


6:40 am on Dec 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

sorry Willis, I misunderstood your question, thought you had a larger file.

I'm not sure what you are trying to accomplish. Do you just want to allow the index of your directories to be shown? Usually that is the default so you wouldn't need an htaccess file for just that.

<added> check this thread [webmasterworld.com] maybe it will help


5:24 pm on Dec 23, 2004 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member


This thread [webmasterworld.com] describes the settings necessary to enable mod_rewrite (and .htaccess by inclusion). I suspect your host is configured with AllowOverride none, in which case, .htaccess files are ignored.



2:24 am on Dec 24, 2004 (gmt 0)

10+ Year Member

Thanks jdMorgan, that was percicely it. Lucky for me I work offa my own server. What should I do if I run into the same problem on a shared server? One where config access is prohibited?


2:36 am on Dec 24, 2004 (gmt 0)

10+ Year Member

weird.. no longer did after I post my thanks, but now I'm getting error messages.

All I did was change:

allowoverride none


allowoverride All

and I thought it started working fine but, it gives me this sort of responce:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, *EMAIL* and inform them of the time the error occurred, and anything you might have done that may have caused the error.



4:04 am on Dec 24, 2004 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Check your server error log. Usually, it will have specific info in it.



9:37 pm on Dec 30, 2004 (gmt 0)

10+ Year Member

Well, I have yet to get to my desktop computer and sort things out. However I'm currently at my latop and have attempted that same none/All change. Things are working nicely at this time.

If anything I'll simply copy the laptop config file n replace with desktop config file. No worries about compatability copying desktop->laptop is how I got it on the laptop in the first place.

But anyway, now that I have that step behind me I'm trying to practice password protecting a directory.

In various readings I have done I understand a person needs as follows for htaccess:

require user

and htpasswd I understand very easily and thats not an issue.

AuthName I understand what thats about. AuthType I've always read leave it to say Basic. require user I think I understand, just set that to be whatever username you desire to be allowed. But the first AuthUserFile... I get what their saying, but I do not get how to know what is right and what is wrong.

Again I'm workin offa localhost... so when my directory, and ht(access/passwd) files are as follows:

C:\Program Files\Apache Group\Apache\htdocs\test1\.htaccess

C:\Program Files\Apache Group\Apache\htdocs\test\.htpasswd

What am I to expect for AuthUserFile?

I also from time to time make Apache available to others using dyndns. so would that at all change what I would use for AuthUserFile? Such as myUserName.dyndns.org


Featured Threads

Hot Threads This Week

Hot Threads This Month