Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about .htaccess modification for CGI / FastCGI #2

Open
JPustkuchen opened this issue May 27, 2020 · 2 comments
Open

Add note about .htaccess modification for CGI / FastCGI #2

JPustkuchen opened this issue May 27, 2020 · 2 comments
Assignees
Labels

Comments

@JPustkuchen
Copy link

JPustkuchen commented May 27, 2020

Hi and thank you for this great plugin!

When using PHP as CGI / FastCGI this plugin may fail to work. You should add the following snippet to the description to be added to the .htaccess aftter RewriteEngine On:

# Make sure Authorization HTTP header is available to PHP
# even when running as CGI or FastCGI.
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Full example:

<IfModule mod_rewrite.c>
RewriteEngine On

# Make sure Authorization HTTP header is available to PHP
# even when running as CGI or FastCGI.
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

I think that will save people from trouble and you from "not working" messages ;)

@JPustkuchen
Copy link
Author

Bump?! I think this is also the reason for several issues here and on the WP Plugin page. Would you mind to add this information?

@samiahmedsiddiqui
Copy link
Owner

samiahmedsiddiqui commented Nov 19, 2020

@JPustkuchen Plugin already setting the rewrite rule in .htaccess file. Can you please verify does it set in your .htaccess file or not?

# BEGIN HTTP Auth
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    </IfModule>
# END HTTP Auth

If it is not set then can you please provide your $_SERVER configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants