GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Dec-2003, 10:34
Pedster2k Pedster2k is offline
Awaiting Email Confirmation
 
Join Date: Dec 2003
Posts: 1
Pedster2k is an unknown quantity at this point

.htaccess on Windows2k, and the trailing slash


Hi, a couple of things.

Firstly, .htaccess on Apache/Win2k.... It doesn't seem to be working, as when I put a working .htaccess & .htpasswd in a directory, it just by-passes it/them... Do I need to add something to my htppd.conf?

Secondly, whenever I type my url without a trailing 'forward-slash' (/) i.e http://www.test.co.uk/forum - it gives me a 'Cannot find server', but when I add the forward-slash i.e http://www.test.co.uk/forum/ - it works perfectly What do I need to do or add to the .conf file?

Thank you for reading, and I hope I've explained myself enough.

TIA

Pedster.tk
  #2  
Old 09-Dec-2003, 23:25
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
When Apache seems to be 'bypass'-ing your .htaccess file, you may want to add something like this to your httpd.conf file and see if it changes anything:
Code:
<Directory /> # Other options... AllowOverride All </Directory>


Regarding your 2nd issue, I cannot recall how I fixed that, maybe the first step is to check your paths in the httpd.conf. Someone else may know for certain.
  #3  
Old 10-Dec-2003, 06:14
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
I think that the second issue has something to do with the option:
UseCanonicalName On

in httpd.conf

just try to change On to Off and see if it works
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #4  
Old 12-Dec-2003, 18:52
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

How to solve the missing trailing slash problem on Apache


Pedster2k, have you figured out this trailing slash issue yet?

I happened to be reading the FAQ off the Apache Manual when I came across this issue mentioned in it and thought I'd paste the solution for anyone else having the same issue in the future...

Quote:
When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.

Add a ServerName directive to the config file to tell it what the domain name of the server is.

The other thing that can occasionally cause this symptom is a misunderstanding of the Alias directive... more...
  #5  
Old 24-Jan-2004, 17:01
amneziac85 amneziac85 is offline
New Member
 
Join Date: Jan 2004
Posts: 7
amneziac85 is on a distinguished road
I have had the exact same problem...

I have my .htaccess file in the folder I want to protect, but for some reason, it doesnt read that this area is suppose to be off limits without a PW. I havn't done anything to special to my httpd.conf file, so maybe its some default settings I need to change. I have checked and it says:

# AccessFileName: The name of the file to look for in each directory
# for access control information.
#
AccessFileName .htaccess

My .htaccess file was set up by someone who does this for a living, and I read it over, looks good, so im stumped. One thing that does catch my attention is that he said it was the first time he had ever set up a .htaccess file on a NT box. Any help would seriously be appreciated. Thanks in advance.
  #6  
Old 24-Jan-2004, 17:20
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello amneziac85.

Did you read post no.2 above? Did you try that?
  #7  
Old 24-Jan-2004, 17:32
amneziac85 amneziac85 is offline
New Member
 
Join Date: Jan 2004
Posts: 7
amneziac85 is on a distinguished road
Let me be the kicking dummy....

JdS...I tried it...didnt work, so when I came to reply to the post, I remembered an old Apache lesson from long ago...RESTART THE SERVER-durf...

So yea, good job JDS, youve done it again, works perfect. Thanks.
 
 

Recent GIDBlogA Week in Kuwait by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:22.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.