• Hello smart people!
    I’ve spent the last two days trying to understand and solve this problem. Not quite there yet, I’m hoping for some advice.

    I have a WordPress install on shared hosting at Dreamhost. It is a podcast using Blubrry’s PowerPress for serving up podcasts. URL is https://www.dribblecast.org. (I’m actually using this as a dev site getting ready to roll this out on the main podcast, https://www.drabblecast.org.)

    The podcast is wanting to offer a premium subscription feed. PowerPress has a function for this. All is good, except the feed auth is handled through http Basic authentication. Since PHP on Dreamhost shared severs is run only using CGI or FastCGI, Apache does not pass the http authentication to PHP. (Apparently mod_php does this fine.)

    There are a number of places which recommend how to work around this, like this one.

    There seems to be a problem when doing this with WordPress. Now, any time I go to a non-existing page, or [b]even the correct URL[/b] for the podcast, I get a generic 404 Not Found. Not the wordpress pretty page, just a generic 404.

    The feed URL I’m testing is https://www.dribblecast.org/feed/feedslug .

    Here is my .htaccess in the root folder. I’ve removed all the WP Supercache entries.

    <IfModule mod_rewrite.c>
         RewriteEngine on
         RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    </IfModule>
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Now if I move the http auth code to below the WordPress block, things start working properly again, but of course the auth fails.

    I clearly don’t understand .htaccess well enough to understand my failure. Any of you smart people have ideas?
    Thanks!
    Tom

Viewing 1 replies (of 1 total)
  • I was hoping someone else would chime in, this isn’t really something that would be in the realm of the PowerPress plugin. I will at least get you on the right track.

    You should put all the rewrite rules in the same block. I would remove what you added, just copy the one line you need “RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]” and paste it above the last rule “RewriteRule . /index.php [L]”.

    First though, I would contact your hosting provider and/or server administrator, you may be able to do this with a line like “SetEnvIfNoCase ^Authorization$ “(.+)” HTTP_AUTHORIZATION=$1″.

Viewing 1 replies (of 1 total)
  • The topic ‘http Basic authentication help’ is closed to new replies.