httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Schweikle <tschwei...@gmail.com>
Subject [users@httpd] Rewrite Issues
Date Sat, 14 May 2016 10:12:25 GMT
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


Mime
View raw message