httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chittaranjan Mandal" <Chittaranjan.Man...@iitkgp.ac.in>
Subject Re: [users@httpd] URL rewriting causing uid to change
Date Tue, 06 Jul 2004 04:50:56 GMT
[Reply to message from: Chittaranjan Mandal]

> When I run showuser.cgi as /~user/cgi-bin/showuser.cgi the acutal
> login id of the user is displayed.
>
> But, when I run /people/user.name/cgi-bin/showuser.cgi the userid
> shown is "apache".

> RewriteMap    lowercase      int:tolower
> RewriteMap    name-to-login  txt:/home/common/http/map.name-to-login
>
> RewriteRule   ^/people/([^/]+)(.*)$  /people/${lowercase:$1}$2
> RewriteRule   ^/people/([^/]+)(.*)$
> /~${name-to-login:$1|nobody}/public_html/$2

Problem solved by replacing the rewrite rules with:
RewriteRule   ^/people/([^/]+)(.*)$           /people/${lowercase:$1}$2
RewriteRule   ^/people/([^/]+)/cgi-bin/(.*)$ 
/~${name-to-login:$1|nobody}/cgi-bin/$2 [P]
RewriteRule   ^/people/([^/]+)(.*)$          
/~${name-to-login:$1|nobody}/public_html/$2

-Chitta

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


Mime
View raw message