Re: Very Puzzling Question About mod_rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 2, 2007 2:59 AM, Jon Forrest <jlforrest@xxxxxxxxxxxx> wrote:
> Joshua Slive wrote:
> > On Nov 1, 2007 8:45 PM, Jon Forrest <jlforrest@xxxxxxxxxxxx> wrote:
> >> Joshua Slive wrote:
> >>
>
> >> Thanks. After doing what you suggest I can see a directory
> >> listing of http://www-demo.cchem.berkeley.edu/username/ which
> >> shows the index.html file. However, if I click on index.html
> >> I get a "404 Not Found" error, and the error log says
> >>
> >> File does not exist:
> >> /users/chemweb/apache2/http-cchem/htdocs/username/index.html
> >
> > So, where is the file actually located?
>
> /users/chemweb/apache2/htdocs/cchem/username/public_html/index.html
>
> I was hoping to put "public_html" after "username" in every
> access. I think my rewrite rules need to be more complicated.

That will indeed be needed.

However since it is /username/ that you need to replace with
/username/public_html/ it shouldn't be that hard.

RewriteRule   ^`/(\w+)/(.+)$               /$1/public_html/$2    [L]

This will only work however if your user name only contains normal
characters and no slashes, but I assumed that this was the case.


Krist
(Disclaimer: I didn't get around to actually testing the above)

-- 
krist.vanbesien@xxxxxxxxx
krist@xxxxxxxxxxxxx
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux