Help with rewrite rules

Šime Ramov hi at
Wed Feb 14 00:04:02 MSK 2007


I'm trying to set-up phpMyID (OpenID). Everything works until the last
point where I actually need to log in, it just stalls after i enter
username and password.

I'm running PHP in CGI mode (nginx proxy), so I need to enter some
rewrite rules because of that.

This is from the htaccess file from the phpMyID distribution:

# If you are running PHP in CGI mode you will need to add one set of these
# directives to your .htaccess file, or your virtualhost configuration.
# The easiest way to do so is to simply rename this file ".htaccess"

# Option 1, mod_rewrite (req)
#RewriteEngine on
#RewriteCond %{HTTP:Authorization} !^$
#RewriteCond %{QUERY_STRING} openid.mode=authorize
#RewriteCond %{QUERY_STRING} !auth=
#RewriteRule (.*) %{REQUEST_URI}?%{QUERY_STRING}&auth=%{HTTP:Authorization} [L]

# Option 2, mod_rewrite (env)
#RewriteEngine on
#RewriteRule \.php$ - [E=PHP_AUTH_DIGEST:%{HTTP:Authorization},L]

# Option 3, mod_setenvif
#SetEnvIf Authorization "(.*)" PHP_AUTH_DIGEST=$1

Now, I need to choose one option (which is possible and best suited
for nginx) and convert apache rewrite rules to nginx rewrite rules...
Any help would be greatly appreciated...

 - Šime

More information about the nginx mailing list