Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

Serving more directories under ~user

Using Apache 1.3, I wish to serve directories other than html in a users' home dir.

For example:
www.domain.com/~user will serve what is in /usr/home/user/html
which currently works, but I also want
www.domain.com/~user/reports to serve what is in /usr/home/user/reports
 .. and not have to put reports under html.

I have tried various methods such as putting "UserDir reports" in <IfModule mod_userdir.c> but that obviously cancels out "UserDir html".

Thanks
0
cfinniga
Asked:
cfinniga
1 Solution
 
samriCommented:
cfniga,

Yes, I can confirm that would be true.  Remember that the purpose of UserDir directive is to enable url http://www.domain.com/~user/ to be mapped to some path in userhome directory (by deafult it would be in ~user/public_html/), having a multiple of this would actually cancel out the first declaration.

I would think that you might need mod_rewrite to actually rewrite the requested URL to the mapped to the new url;

Check out the URL rewriting Guide,
http://httpd.apache.org/docs/misc/rewriteguide.html

Another possibilities would be AliasMatch (mod_alias);
http://httpd.apache.org/docs/mod/mod_alias.html#aliasmatch

I'm not sure which would be the best (and simplest).  Perhaps I might need to workout some possible config that works.

Feel free to look at both options.

regards,
0
 
periwinkleCommented:
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area with the following recommendation for this question:

Answered by Samri

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

periwinkle
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now