You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Thomas Schweikle <ts...@gmail.com> on 2016/05/14 10:12:25 UTC

[users@httpd] Rewrite Issues

Hi!

Trying to rewrite an URL: '' (nothing)
To: /~<user>/output

I've defined:

RewriteCond %{LA-U:REMOTE_USER} !^$
RewriteCond %{HTTP_URI} ^/*$
RewriteRule ^/*$ /~%{LA-U:REMOTE_USER} [NS]

RewriteCond %{LA-U:REMOTE_USER} !^$
RewriteRule ^/~([^/]+)/?(.*)$ /~%{LA-U:REMOTE_USER}/output/$2 [NS]

If I access the server http://<server>
It does what is expected:
http://<server>
http://<server>/~ -> Login
http://<server>
http://<server>/~<user>/output

But giving
http://<server>/~xyz
http://<server>/~xyz -> Login
http://<server>/~<user>
http://<server>/~<user>/output/output

I'd like to have the users:
- to be forced to login
- to be redirected to their user directory
- to be unable to access any other directory on the server

Is this possibe with apache, user_dir and rewrites at all?

-- 
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org