IBM developerWorks
           Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 21st, 2001, 11:50 AM
platform platform is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Posts: 2 platform User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
authentication before rewrite

I have written an external redirection program in which I 'm dependent to username/passwd from basic auth.

Unfortunately Apache first processes the redirection and thereafter the authentication.

Is there a way to change this?

Reply With Quote
  #2  
Old September 21st, 2001, 10:42 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Show us your code.

Reply With Quote
  #3  
Old September 23rd, 2001, 07:30 AM
platform platform is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Posts: 2 platform User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok, my code in httpd.conf:

------snip------

<VirtualHost URL>

<Location />
AuthType Basic
AuthName "Authtest"
AuthUserFile /usr/local/httpd/access/users
require valid-user
</Location>

ServerName URL
DocumentRoot /usr/local/httpd/htdocs/
ErrorLog /var/log/httpd/xxxxx-error_log
CustomLog /var/log/httpd/xxxxx-access_log combined

RewriteEngine on
RewriteLog /var/log/httpd/rewrite.log
RewriteLogLevel 9

RewriteMap auth-map prg:/tmp/redirection
RewriteRule ^/(.*)$ URL${auth-map:$1:%{LA-U:REMOTE_USER}:%{HTTP_COOKIE}} [P]

</VirtualHost>

------snap------

Apache every time first proceed the rewrite and thereafter ask me for username/passwd.

Into my external program I compare username and cookie-key with a database and give a url of an error page back when they not correspond.

Can I change the sequence of the processes or do you have another idea, as I could solve this problem.

Thanks in advance.

Reply With Quote
  #4  
Old September 23rd, 2001, 09:52 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What do you have for <Directory "/usr/local/httpd/htdocs"> ?

You should move your Rewrite* lines to within that <Directory> block.

Also, why don't you use internal redirection instead?

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > authentication before rewrite


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway