You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eric Covener <co...@gmail.com> on 2008/11/05 02:49:39 UTC

Re: [users@httpd] Re: mod_rewrite rule

On Tue, Nov 4, 2008 at 8:35 PM, Seb <sp...@gmail.com> wrote:
> On Tue, 4 Nov 2008 20:21:39 -0500,
> "Eric Covener" <co...@gmail.com> wrote:
> and my user needs to have a directory Path/ have a lower case URI (as
> http://some.host.com/~user/path).  With the rule I tried:


> RewriteRule ^path(.*)$ Path$1 [last]
>
> I get:
>
> ---<---------------cut here---------------start-------------->---
> Not Found
> The requested URL /home/user/WWW/Path was not found on this server.
> ---<---------------cut here---------------end---------------->---
>
> which is closer.  WWW is the directory set as public via mod_userdir.

Closer to what?  What path do you want it to be rewritten to?

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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


Re: [users@httpd] Re: mod_rewrite rule

Posted by Eric Covener <co...@gmail.com>.
On Tue, Nov 4, 2008 at 8:59 PM, Seb <sp...@gmail.com> wrote:
> On Tue, 4 Nov 2008 20:49:39 -0500,
> "Eric Covener" <co...@gmail.com> wrote:
>
>> On Tue, Nov 4, 2008 at 8:35 PM, Seb <sp...@gmail.com> wrote:
>>> On Tue, 4 Nov 2008 20:21:39 -0500,
>>> "Eric Covener" <co...@gmail.com> wrote:
>>> and my user needs to have a directory Path/ have a lower case URI (as
>>> http://some.host.com/~user/path).  With the rule I tried:
>
>
>>> RewriteRule ^path(.*)$ Path$1 [last]
>
>>> I get:
>
>>> ---<---------------cut here---------------start-------------->--- Not
>>> Found The requested URL /home/user/WWW/Path was not found on this
>>> server.  ---<---------------cut
>>> here---------------end---------------->---
>
>>> which is closer.  WWW is the directory set as public via mod_userdir.
>
>> Closer to what?  What path do you want it to be rewritten to?
>
> Well, /home/user/WWW/Path is the right path in the local file system,
> but, as I said, I need it to go to http://some.host.com/~user/path.

Can you clarify what "go to" means? Do you want it to redirect?

> Why
> is the whole host URI that the rule actually matched not placed in the
> substitution?  It seems ridiculous to have to do that in the right hand
> side of the rule, when the left hand side obviously matched, so how does
> one write that right hand side?

The right hand side is a path in the filesystem, not a URL, in the
general case. A full URL if you're redirecting or proxying.


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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


[users@httpd] Re: mod_rewrite rule

Posted by Seb <sp...@gmail.com>.
On Tue, 4 Nov 2008 20:49:39 -0500,
"Eric Covener" <co...@gmail.com> wrote:

> On Tue, Nov 4, 2008 at 8:35 PM, Seb <sp...@gmail.com> wrote:
>> On Tue, 4 Nov 2008 20:21:39 -0500,
>> "Eric Covener" <co...@gmail.com> wrote:
>> and my user needs to have a directory Path/ have a lower case URI (as
>> http://some.host.com/~user/path).  With the rule I tried:


>> RewriteRule ^path(.*)$ Path$1 [last]

>> I get:

>> ---<---------------cut here---------------start-------------->--- Not
>> Found The requested URL /home/user/WWW/Path was not found on this
>> server.  ---<---------------cut
>> here---------------end---------------->---

>> which is closer.  WWW is the directory set as public via mod_userdir.

> Closer to what?  What path do you want it to be rewritten to?

Well, /home/user/WWW/Path is the right path in the local file system,
but, as I said, I need it to go to http://some.host.com/~user/path.  Why
is the whole host URI that the rule actually matched not placed in the
substitution?  It seems ridiculous to have to do that in the right hand
side of the rule, when the left hand side obviously matched, so how does
one write that right hand side?


-- 
Seb


---------------------------------------------------------------------
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