Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm in the following situation:

I have a directory named test at the top level of my site. When I request http://mysite.com/test, apache automatically adds a trailing slash and gives me http://mysite.com/test/. Is there a way to disable that?

share|improve this question
don't do that. why would you do that? – hop Sep 1 '10 at 16:11
Is this a Unix question? Apache's "/" is not a Unix-dependent feature, correct? I believe this question belongs on Serverfault. – Stefan Lasiewski Sep 1 '10 at 17:26
@Stefan: probably, but do you have enough points to close a question yet? unix.stackexchange is depressing as it is… no need to bicker about one of the least problems. – hop Sep 1 '10 at 21:17
@hop being offtopic doesn't make it less depressing. IMO the real problem is we have a broken community, with ubuntu having its own SE. I really hope the ultimate vote is to merge. – xenoterracide Sep 2 '10 at 15:31
@Stefan ubuntu se should merge with superuser. have you seen the questions tehre? – hop Sep 2 '10 at 15:49

There are several ways to fix missing slashes, but the most likely one in your case is the Directory Slash Directive of mod_dir, which by default is on.

I'd recommend not to change that configuration, though, because there are good reasons for its existence.

share|improve this answer
thanks for your answer. actually I want to use mod_rewrite to catch everything so I think it'll be ok – greg Sep 1 '10 at 21:28

I found it! http://httpd.apache.org/docs/current/mod/mod_dir.html

share|improve this answer
i found it first ;) – hop Sep 1 '10 at 16:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.