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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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 |