Re: Newbie - 2 items: directories and trailing slashes, Apache 2.0

This is a discussion on Re: Newbie - 2 items: directories and trailing slashes, Apache 2.0 within the Apache Web Server forums, part of the Web Server and Related Forums category; On 17 Jul 2003 04:47:27 -0700, The Other Guy responded to a post from kynan76@yahoo.com who ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-17-2003
The Other Guy
 
Posts: n/a
Default Re: Newbie - 2 items: directories and trailing slashes, Apache 2.0

On 17 Jul 2003 04:47:27 -0700, The Other Guy responded to a post from
kynan76@yahoo.com who wrote in alt.apache.configuration:

>Hi,
>
>I seem to be having trouble with two things:
>
>1.
>I have set up UserDir directives, and that seems to work fine for the
>/home/*/public_html directories.
>I can't seem to change this to /home/*/www. I changed the directive
>and the path just below the directive, but I still always get a file
>not found error! (The file is definitely there - I have a www and an
>html dir.)
>What could be wrong?


Did you start restart Apache after making changes to httpd.conf?
See also comments below.


>2.
>When using the public_html directories, I can access the index.htm
>file via
>http://blah.blah.blah/~user/index.htm and
>http://blah.blah.blah/~user/
>but not:
>http://blah.blah.blah/~user
>Why not? Is there something I can change to map this correctly?


When you defined your user directory location in the httpd.conf file,
you may have used a trailing slash at the end of it (e.g., UserDir
"/usr/local/home/public_html/"). Removing the slash at the end should
do it. Either that, or you have to set a server name. See
http://httpd.apache.org/docs/misc/FA...set-servername and also
http://httpd.apache.org/docs/mod/core.html#servername

If you defined your subdirectory directive in the httpd.conf file, you
may have used a trailing slash at the end of it (e.g., <Directory
"/usr/local/apache/htdocs/subdirectory/">). Removing the slash at the
end should do it.

If you are using a *nix O/S, they don't require file extensions, and
it assumes that /mysite is a file rather than a directory. A solution
is documented under the RewriteRule section at:
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html


>Thanks in advance for your advice!
>Kynan



HTH
TOG

--
../configure --prefix=~/zyterion
Not this guy or that guy, The Other Guy.

This spot may contain a satirical comment or comedic source,
and is meant to be funny. If you are easily offended, gullible
or don't have a sense of humour we suggest you read elsewhere.
  #2 (permalink)  
Old 07-19-2003
kynan76@yahoo.com
 
Posts: n/a
Default Re: Newbie - 2 items: directories and trailing slashes, Apache 2.0

Got it!!


RewriteEngine On
RewriteRule ^/([uge])/([^/]+)$ /$1/$2/ [R]


Thanks TOG



Does anyone know how to configure Apache to run user directories without the tilde?

i.e. /server/user
instead of /server/~user

Thanks
Kynan
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:38 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0