LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2003, 11:31 PM   #1
Buttercups
Member
 
Registered: Jul 2002
Location: Malaysia
Distribution: RH
Posts: 42

Rep: Reputation: 15
Url without ending slash


hi,

i have a couple of sites residing on my webserver. what should i do to enable users to type in the url without having to include a slash "/" at the end of the url? Btw,if this is of any help, i have disabled Directory Indexing.

eg:
http://www.x.com/site1/ ----> http://www.x.com/site1

Last edited by Buttercups; 06-26-2003 at 11:33 PM.
 
Old 06-27-2003, 04:04 AM   #2
rmartine
Member
 
Registered: Dec 2002
Location: San Luis Obispo, CA
Distribution: Fedora Core 3
Posts: 618

Rep: Reputation: 30
Try this... this is all I can think of.

Sorry

http://httpd.apache.org/docs/misc/FA...set-servername

I guess this also assumes you're using Apache huh...
 
Old 06-27-2003, 04:34 AM   #3
Jinkzer
LQ Newbie
 
Registered: Jun 2003
Location: Stockholm Sweden
Distribution: Gentoo, Slackaware, Flux, KDE
Posts: 20

Rep: Reputation: 0
If you are using apache take a look in the file
/<apache-dir>/conf/httpd.conf (or search for it)

Find the parameter "DocumentRoot" and make sure you don't have a "/" on the end of that. (there could be more than one)
The same applies to all values of <Directory "/<apachedir>/htdocs/mysites>"

I've done this typo-error a couple of times with the result you describe.

Restart apache with /<apachedir>/bin/apachectl restart

/J
 
Old 06-27-2003, 10:15 AM   #4
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
apache has to know its own servername for that to work correctly.
 
Old 06-27-2003, 10:16 PM   #5
Buttercups
Member
 
Registered: Jul 2002
Location: Malaysia
Distribution: RH
Posts: 42

Original Poster
Rep: Reputation: 15
i tried this solution based on the article rmartine gave.

1. i removed the end slash at the

Alias /doc/ /usr/share/doc

2. But because my server is a local development server, thus the servername is not FQDN, i need to remain using IP addressing. (http://161.x.x.x.x/site1). So i turn off here

UseCanonicalName Off


and it works. I dun know if this is a valid solution, but it works for me.

Btw, my DocumentRoot is already set without any ending slash.


thanks guys for ur help.
 
  


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
ERROR The requested URL could not be retrieved While trying to retrieve the URL: /re Niceman2005 Linux - General 1 06-29-2005 10:51 AM
How do I type 0 with a slash thru it? kc0cxa Linux - General 2 03-06-2004 12:44 AM
Slash dorward LQ Suggestions & Feedback 1 11-23-2001 09:20 AM
What Slash r u using? eraser LQ Suggestions & Feedback 4 09-08-2000 09:37 PM
Slash is back up. jeremy LQ Suggestions & Feedback 0 09-04-2000 02:55 PM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration