httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Dewitt - NOAA Affiliate <otis.dew...@noaa.gov>
Subject Re: [users@httpd] Change from ~username to /username questions
Date Mon, 05 May 2014 03:07:59 GMT
Greetings Yehuda,


1.) You can try something likfe this for one url:

RewriteRule ^~blog/(.*)$ /site/legacy/users/blog/$1 [R=301,L]


2.) You can also play with this rewrite to make fit for you:

RewriteEngine On
#RewriteLog logs/rewrite.log # Uncomment for rewrite logging
#RewriteLogLevel 3 # uncomment for verbose logging
RewriteCond %{REQUEST_URI} ^/([^/]+)
RewriteCond /home/%1 -d
RewriteRule ^/([^/]+)(.*) /home/$1/public_html/$2


Thanks,
Otis


On Sun, May 4, 2014 at 10:54 PM, Yehuda Katz <yehuda@ymkatz.net> wrote:

> mod_userdir does not support this. You would have to create a symlink for
> each user.
> Off the top of my head, you might be able to work around it with
> mod_rewrite, but I can't test any rules now, so I don't want to try writing
> one.
>
> - Y
>
>
> On Fri, May 2, 2014 at 2:18 PM, Rose, John B <jbrose@utk.edu> wrote:
>
>>  Has anyone changed access to personal web sites from
>>
>>  website.com/~username
>>
>>   to
>>
>>  website.com/username
>>
>>  And still use
>>
>>  /home/username/public_html
>>
>>  As the home web directories?
>>
>> If so, can you share your method?
>>
>>  Thanks
>>
>
>

Mime
View raw message