LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-18-2004, 09:34 AM   #1
tantric
LQ Newbie
 
Registered: Oct 2003
Location: Hampshire, UK
Distribution: SuSE 8.2 RH9
Posts: 20

Rep: Reputation: 0
Apache trailing slash puzzler


Hello

I am having a bit of head scratch,

I have an apache server and I can type in urls as this

whatever.domain.com/folder/

but not like this

whatever.domain.com/folder

I just never finds the page.

I have set up

Options Indexes

in the httpd.conf but it still doesnt work!

Any advice would be greatly appreciated

Thanks
 
Old 03-18-2004, 09:50 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 198Reputation: 198
You need to enable Canonical in your httpd.conf file. Usually it should already be in the file by default, if not add something like this to your file and restart apache:

Code:
#
# UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
# Apache needs to construct a self-referencing URL (a URL that refers back
# to the server the response is coming from) it will use ServerName and
# Port to form a "canonical" name.  With this setting off, Apache will
# use the hostname:port that the client supplied, when possible.  This
# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
#
UseCanonicalName On
 
Old 03-18-2004, 04:13 PM   #3
tantric
LQ Newbie
 
Registered: Oct 2003
Location: Hampshire, UK
Distribution: SuSE 8.2 RH9
Posts: 20

Original Poster
Rep: Reputation: 0
Ah, I didnt have the servername on, I was just accessing through an IP address, so that was the problem.

As soon as I put the Servername line in it worked

Guess I was fibbing about accessing from a hostname.

Thanks a lot for your help!


Last edited by tantric; 03-18-2004 at 04:17 PM.
 
Old 04-08-2004, 01:25 PM   #4
giluriel
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
Trailing slash - The solution

Hi,

I had the same problem like most of us:
http://www.myserver.com/directory - does not work
http://www.myserver.com/directory/ anoying.. but works

well...

I only changed "UseCanonicalName on" to "UseCanonicalName Off"

and .. now I'm smiling ...

:-)
 
Old 04-11-2004, 04:18 PM   #5
leonbao
LQ Newbie
 
Registered: Apr 2004
Posts: 1

Rep: Reputation: 0
Talking

Now I'm smiling too...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trailing slash problem in apache... or DNS? Swakoo Linux - Newbie 1 06-07-2005 10:20 PM
no trailing slash -> apache redirect to microsoft site? SerfurJ Linux - Software 6 03-15-2005 06:25 AM
Apache trailing slash boondock_saint Linux - General 9 07-07-2004 03:31 PM
trailing slash in Apache gives 404 errors rabbate Linux - General 6 04-30-2004 08:34 AM
Necessary trailing slash in apache directories silversky Linux - Software 3 03-03-2004 03:19 AM


All times are GMT -5. The time now is 01:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration