WordPress.org

Ready to get started?Download WordPress

Forums

podPress
[resolved] Server returned HTTP Error 403: Forbidden (42 posts)

  1. toptm
    Member
    Posted 3 years ago #

    Tim,

    The conversation started as a comment on his website, but has developed into an email conversation. This was his latest entry:

    Nope disregard this. I found a way to test this without having to configure
    everything and have been able to recreate the error and also to have it work
    correctly so I am now putting together the correct htaccess code that will
    work. I just needed to understand exactly what was happening and now I do.
    Will have a fix pretty soon.

    As for the the "Nope, disregard this...", it's because he sent me a previous email with code I should try to input in my .htaccess file.

  2. toptm
    Member
    Posted 3 years ago #

    I'm not sure if it will be proper if I gave out his email, but his website is http://www.ait-pro.com. You can go here if you want to see the comment thread. Mine is the last one.

  3. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Ok. Thank you!

    -Tim

  4. AITpro
    Member
    Posted 3 years ago #

    Here is the working htaccess fix. This will be included in the next relase of BPS. In the meantime i have this fix listed on my plugin compatibility and testing page. I had no idea this thread was going on, but I could not have solved the issue much sooner anyway. You know how it is. ;) Until i can figure out how to clone myself that is. LOL

    # podPress rewrite ?feed=podcast as /feed/podcast/
    # If you have WordPress installed in a subfolder you will need to add the
    # subfolder name to the RewriteRule (.*) /blog/feed/podcast/$1? [R=301,L]
    RewriteCond %{QUERY_STRING} feed=podcast [NC]
    RewriteRule (.*) /feed/podcast/$1? [R=301,L]

    Thanks,
    Regards,
    Ed

  5. raymer
    Member
    Posted 3 years ago #

    Hmm. I'm glad this will help toptm, but I don't think it will help anyone who has customized their feeds from podpress's new feed customization options.

    By the way, does this plugin (Bulletproof security) work with custom permalinks structures in wordpress? I use this one often /%category%/%postname%/
    Seems like my whole site would break with this plugin even if I wasn't running podpress. Also, I do run wordpress from a subfolder so I would have to tweak my .htaccess file manually every time anyway.

  6. AITpro
    Member
    Posted 3 years ago #

    The htaccess code is not set in stone meaning you would just follow the same principle following the standard ?feed=podcast format.

    Yes BPS works with Pretty Permalinks. I am using the most recommended PP links for optimum performance plus the other bennies >>> /%post_id%/%category%/%postname%/ and I have also tested with the PP links that you are using.

    BPS has built-in File Editing, File Uploading and Downloading to make the whole editing and backup process faster. Since I'm a professional developer, designer and coder I kind of built the BPS plugin with myself in mind. ;) I like having total control over an app where i can edit and change major functionality on the fly without having to dig around in code that is intertwined in multiple functions. Now most people are just regular users so they would obviously prefer everything automated and already done for them. At some point BPS will be designed to accomodate both developers and regular folks by adding the option to choose to allow manual control or just automate everything. So to answer your question directly in your case yes you would have to make the initial edits then perform a backup so that on the next BPS upgrade you would have a copy of your edits. This is a bit clunky I know. I still have not figured out what the optimum universal scenario should be to work in at least 90% of all WP cases. It is impossible to get this to 100%. I have looked at it every which way possible and well it is just not possible due to the wide variety of variations of setups and many other factors. The whole thing would be simplified from the user's end if multiple versions of BPS was available for several different possible setups. The subfolder issue will be automated at some point - BPS will detect your subfolder and just automatically write the folder name to the required htaccess files. Like i said I started building from a developers viewpoint and needs so now i need to also add a totally automated no brainer option for regular folks. I understand that even one edit can confuse people because they don't know BPS inside and out like i do. so total auto pilot mode will be offered soon. probably in the next release after this next one. And for people who just want the BPs filters they can just grab those and stick them in their existing htaccess file. To date BPS has been successfully hacked once out of somewhere in the neighborhood of 300,000 attempts. ;) Thanks.

  7. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Here is the working htaccess fix. This will be included in the next relase of BPS. In the meantime i have this fix listed on my plugin compatibility and testing page.

    Ed, thank you for making a special entry regarding podPress on your page and in the BPS plugin.

    The Feed with the slug name "podcast" is probably the most important Feed of the custom Feeds which podPress adds to a blog by default. But there is also a Feed with the name "playlist.xspf" which creates a playlist for a sidebar widget of podPress. This Feed is mandatory and has always the same slug name. Other Feeds are enhancedpodcast, torrent and premium.
    But I'm not sure how important it really is that both URL schemes work at the same time. I guess it becomes problematic if some uses the default-Permalink scheme for a while, a lot of people subscribe to the Feed using this scheme and later the blogger decides to change the Permalink scheme and starts using BPS. The Feed URL with the default-scheme stops working if it is not among the rules in the .htaccess file.

    podPress makes it possible to change the slug names of the additional Feeds. It is also possible to activate or deactivate them. Because podPress does not save the Permalink settings automatically on an update of the Feed settings, the user needs to save these settings manually if he/she uses a non-default Permalink scheme.
    podPress uses the add_feed() function to the feeds and is maybe not the only plugin which does such things.

    Maybe it is a good idea that you make note in your instructions which explains how-to add RewriteCond and RewriteRules for Feeds in general and use the lines above as an example.
    (BTW: The XSPF sidebar widget of podPress uses always the playlist.xspf Feed URL in the current Permalink scheme. No need for an .htaccess entry for this Feed. The Feed Buttons widget of podPress works also by default with URL of the current Permalink scheme.)

    Regards,
    Tim

  8. AITpro
    Member
    Posted 3 years ago #

    Hi Tim,
    ok first off let me explain exactly what caused the problem with the podcast feed so that we are both on the same page. ?feed=podcast was being seen by the BPS filters as an external request that was forbidden instead of an internal request that would not be an issue at all. I was unable to use an htaccess skip rule to skip the filters so I created a query string match rule to "override" the filters for this particular query string. The question mark is the primary part of the string that BPS is reacting to. I didn't dig very deep into your coding to see why this was occurring and instead just tried a simple logical fix which worked.

    So i have some minor grey areas about podPress since i have not gone through all the coding and have not set up any actual feeds. I understand the Permalink and slug part of the equation completely (and really like that you have added the feature to add a custom slug - very smart ;))

    The issue that is currently occurring will be a moot point in the future with BPS because i will adding coding to perform htaccess rule writing based on plugin detection. ie if podpress is detected write these rules X,Y and Z. This becomes more complex if someone installs podPress after BPS and then adds a custom feed. For now though manual editing is still going to be required for at least the next 2 version releases of BPS.

    htaccess rules are processed in milliseconds (even if you have an htaccess file that is thousands of code lines long) so the amount of rules is not a factor whatsoever. Therefore it would be best to break up the podPress rules instead of trying to include them all in a single section or code segment.

    This example would be nice and tidy, but obviously it would not work for many reasons. ie multiple individual feeds, etc.

    RewriteCond %{QUERY_STRING} feed=podcast [NC, OR]
    RewriteCond %{QUERY_STRING} feed=enhancedpodcast [NC,OR]
    RewriteCond %{QUERY_STRING} feed=torrent [NC,OR]
    RewriteCond %{QUERY_STRING} feed=premimum [NC]
    RewriteRule (.*) /feed/custom-slug/$1? [R=301,L]

    so...

    This is the way it should be done to factor in the widest possible range of scenarios.

    # podPress rewrite ?feed=podcast as feed=podcast
    # If you are using a custom slug then add the slug name to the rewriterule
    # RewriteRule (.*) /feed/custom-slug-name/$1? [R=301,L]
    # If you have WordPress installed in a subfolder you will need to add the
    # subfolder name to the RewriteRule (.*) /blog/feed=podcast/$1? [R=301]
    RewriteCond %{QUERY_STRING} feed=podcast [NC]
    RewriteRule (.*) /feed/podcast/$1? [R=301,L]
    # podPress rewrite ?feed=enhancedpodcast as feed=enhancedpodcast
    # If you are using a custom slug then add the slug name to the rewriterule
    # RewriteRule (.*) /feed/custom-slug-name/$1? [R=301,L]
    # If you have WordPress installed in a subfolder you will need to add the
    # subfolder name to the RewriteRule (.*) /blog/feed=enhancedpodcast/$1? [R=301]
    RewriteCond %{QUERY_STRING} feed=enhancedpodcast [NC]
    RewriteRule (.*) /feed/enhancedpodcast/$1? [R=301,L]
    # podPress rewrite ?feed=torrent as feed=torrent
    # If you are using a custom slug then add the slug name to the rewriterule
    # RewriteRule (.*) /feed/custom-slug-name/$1? [R=301,L]
    # If you have WordPress installed in a subfolder you will need to add the
    # subfolder name to the RewriteRule (.*) /blog/feed=torrent/$1? [R=301]
    RewriteCond %{QUERY_STRING} feed=torrent [NC]
    RewriteRule (.*) /feed/torrent/$1? [R=301,L]

    I don't think the playlist.xspf will be an issue at all, but when i get a chance i will actually set up an actual podcast and play around with it.
    Thanks,
    Ed

  9. AITpro
    Member
    Posted 3 years ago #

    whoops so yeah the new htaccess code for podPress will be included in the secure.htaccess file in the next release of BPS. I left out "premium" in the examples above, but that will included as well. I'll add all this info to my plugin compatibility testing page too.
    Thanks,
    Ed

  10. AITpro
    Member
    Posted 3 years ago #

    Rats there are typos in the code examples and the comment is closed for editing phooey.

    correct coding examples:

    # podPress rewrite ?feed=podcast as /feed/podcast
    # If you are using a custom slug then add the slug name to the rewriterule
    # RewriteRule (.*) /feed/custom-slug-name/$1? [R=301,L]
    # If you have WordPress installed in a subfolder you will need to add the
    # subfolder name to the RewriteRule (.*) /blog/feed/podcast/$1? [R=301]
    RewriteCond %{QUERY_STRING} feed=podcast [NC]
    RewriteRule (.*) /feed/podcast/$1? [R=301,L]
    # podPress rewrite ?feed=enhancedpodcast as /feed/enhancedpodcast
    # If you are using a custom slug then add the slug name to the rewriterule
    # RewriteRule (.*) /feed/custom-slug-name/$1? [R=301,L]
    # If you have WordPress installed in a subfolder you will need to add the
    # subfolder name to the RewriteRule (.*) /blog/feed/enhancedpodcast/$1? [R=301]
    RewriteCond %{QUERY_STRING} feed=enhancedpodcast [NC]
    RewriteRule (.*) /feed/enhancedpodcast/$1? [R=301,L]
    # podPress rewrite ?feed=torrent as /feed/torrent
    # If you are using a custom slug then add the slug name to the rewriterule
    # RewriteRule (.*) /feed/custom-slug-name/$1? [R=301,L]
    # If you have WordPress installed in a subfolder you will need to add the
    # subfolder name to the RewriteRule (.*) /blog/feed/torrent/$1? [R=301]
    RewriteCond %{QUERY_STRING} feed=torrent [NC]
    RewriteRule (.*) /feed/torrent/$1? [R=301,L]
    # podPress rewrite ?feed=premium as /feed/premium
    # If you are using a custom slug then add the slug name to the rewriterule
    # RewriteRule (.*) /feed/custom-slug-name/$1? [R=301,L]
    # If you have WordPress installed in a subfolder you will need to add the
    # subfolder name to the RewriteRule (.*) /blog/feed/premium/$1? [R=301]
    RewriteCond %{QUERY_STRING} feed=premimum [NC]
    RewriteRule (.*) /feed/premium/$1? [R=301,L]
  11. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Ed,

    I didn't dig very deep into your coding to see why this was occurring

    That is maybe not necessary and probably no problem. Because podPress influence the rewrite rules only indirectly. It adds the Feeds with the WP function add_feed().
    That is also why the user needs to save the Permalink settings separately after changing the slug name or after changing the status of one of additional Feeds if he/she uses a non-default Permalink scheme.
    One can monitor what this add_feed() function changes in the WP rewrite settings for instance with the AskApache RewriteRules Viewer plugin.

    What I'm trying say is that podPress uses no special custom code to add Feeds to a blog. On the contrary it uses a WP function to do that. Further it does not add something to the .htaccess file.

    But anyway. I think that your instructions for creating new rules for new or different Feed slugs are very very helpful - also the pre-assembled rules for the default Feeds of podPress.

    Thank you very much!

    Regards,
    Tim

  12. AITpro
    Member
    Posted 3 years ago #

    Tim,
    Cool. Yeah i took a minute to look at what was really going on behind and the scenes with podPress and followed the hook. ;) Very nice coding work my friend. :) I took a look at the rewriterules viewer. That could come in handy for troubleshooting permalink structure issues down the road. Might have to add it to my tool belt. ;) Yeah this default and manual edit method is ok for now, but ideally fully automated and seamless is the way to go. Hopefully i will have all that completed in a month or so. Thanks.
    Regards,
    Ed

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic