I've been searching a lot and one of the tips may be this from
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html:
"Home directory expansion
When the substitution string begins with a string resembling "/
~user" (via explicit text or backreferences), mod_rewrite performs
home directory expansion independent of the presence or configuration
of mod_userdir.
This expansion does not occur when the PT flag is used on the
RewriteRule directive."
Unfortunately it does not work, but maybe it's not what my problem is.
Mine substitution string does not contain ~user, it actually is
"register.html".
Does anybody has any idea how to solve this problem? I have to be able
to use mod_rewrite with url containing ~user. What is this filesystem
conversion from?
Best regards,
teel
teel127.0.0.1 - - [06/Oct/2007:23:05:43 +0200] [127.0.0.1/sid#819e6a8]
[rid#839b8c8/initial] (3) [perdir /home/tomek/public_html/somesite/]
strip per-dir prefix: /home/tomek/public_html/somesite/register.html -
> rejestracja.html
127.0.0.1 - - [06/Oct/2007:23:05:43 +0200] [127.0.0.1/sid#819e6a8]
[rid#839b8c8/initial] (3) [perdir /home/tomek/public_html/somesite/]
applying pattern '(.+)\.html$' to uri 'register.html'
127.0.0.1 - - [06/Oct/2007:23:05:43 +0200] [127.0.0.1/sid#819e6a8]
[rid#839b8c8/initial] (2) [perdir /home/tomek/public_html/somesite/]
rewrite 'register.html' -> 'register.php'
127.0.0.1 - - [06/Oct/2007:23:05:43 +0200] [127.0.0.1/sid#819e6a8]
[rid#839b8c8/initial] (3) [perdir /home/tomek/public_html/somesite/]
add per-dir prefix: register.php -> /home/tomek/public_html/somesite/
register.php
127.0.0.1 - - [06/Oct/2007:23:05:43 +0200] [127.0.0.1/sid#819e6a8]
[rid#839b8c8/initial] (1) [perdir /home/tomek/public_html/somesite/]
internal redirect with /home/tomek/public_html/somesite/register.php
[INTERNAL REDIRECT]
Best regards,
teel
Thank you for doing so much research by yourself!
>Unfortunately it does not work, but maybe it's not what my problem is.
>Mine substitution string does not contain ~user, it actually is
>"register.html".
Your substitution string doesn't contain it explicitly, but the
_backreference_ $1 does begin with /~tomek/, so this rule
actually applies.
Try [LPT] or something like that. Perhaps [L,PT], I'm no very
familiar with rewrites.
>Does anybody has any idea how to solve this problem? I have to be able
>to use mod_rewrite with url containing ~user. What is this filesystem
>conversion from?
>
>Best regards,
>teel
Good luck!
--
( Kees
)
c[_] Clairvoyants meeting canceled due to unforeseen events. (#449)
And this part does not work unfortunately. Neither [L] nor [L,PT], nor
[PT] ([LPT] causes a 500 error).
Thanks anyway!
Best regards,
teel
RewriteEngine On
RewriteBase /~username/somesite/
RewriteRule .....
Best regards,
teel