httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <cs...@fx.ro>
Subject RE: [users@httpd] mod_rewrite is the most difficult...
Date Wed, 23 Jul 2003 12:26:08 GMT
Assuming that public_html is a directory and not a file, what about
something like this (probably not optimum but still functional ;-)

##########
Alias /ftp/ "/home/ftp/"
<Directory "/home/ftp/">
        RewriteEngine on
        RewriteCond %{REQUEST_URI} ^\/ftp\/([^/]+)\/*$
        RewriteCond /home/ftp/%1/public_html -d
        RewriteRule .* /ftp/%1/public_html/ [R]
</Directory>
##########

Lian Sebe, M.Sc.
Freelance Analyst-Programmer
www.programEz.net

> -----Original Message-----
> From: Al Vazquez [mailto:ajv3@geneseo.edu]
> Sent: Wednesday, July 23, 2003 1:21 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] mod_rewrite is the most difficult...
>
>
> ...thing I've come across in apache thus far.  Reading the documentaion
> is almost no help.  Please help me do this.
>
> My server root is /var/www
> I have an alias /ftp  /home/ftp
> under /home/ftp  are various user folders
> ex:  /home/ftp/user1
> If a user navigates to /ftp/user1 I would like to:
>    check and see if /home/ftp/user1/public_html exists
>    if it does exist I would like to:
>       redirect the user to /home/ftp/user1/public_html
>
> I cannot, for the life of me, figure out how to do this.
>
> I have gone through the documentation and several newbie tutorials on
> the web, but to no avail.  I just am too slow to understand the
> scripting language used in the directives.
>
> If anyone could PLEASE help me with this, I would be eternally grateful.
>
> TIA,
> A.V.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message