homepage Welcome to WebmasterWorld Guest from 54.226.18.74
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
htaccess fails to work, could something be wrong?
how can I test?
Willis




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

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.

 

nancyb




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

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.

Willis




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

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.

nancyb




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

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

jdMorgan




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

Willis,

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.

Jim

Willis




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

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?

Willis




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

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

All I did was change:

allowoverride none

to

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.

Thoughts?

jdMorgan




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

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

Jim

Willis




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

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:

AuthUserFile
AuthName
AuthType
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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved