• Resolved gkhillboro

    (@gkhillboro)


    We have installed the plugin, and this has successfully solved the core problem of file access. However, there are users that should have legitimate access (by logging in etc). The wording of the default Apache error message is not helpful.

    The error message shown (Chrome), is:

    Not Found

    The requested URL was not found on this server.

    (There’s no “404” mentioned)

    Anyway, we added the following to our .htaccess

    ErrorDocument 404 /error-restricted-content/

    This has not made any difference.

    We have also tried setting the same page within
    PDA > Settings > Customize “No Access” Page

    This does not seem to do anything either.

    What are we doing wrong? Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author BWPS Team

    (@buildwps)

    Hello @gkhillboro,

    Thank you for reaching our support!

    Could you please share a sample URL with us? Also, you can try Basic Troubleshooting. Please reach out to us by email at support(at)wpfolio.com for faster and more convenient support.

    Thread Starter gkhillboro

    (@gkhillboro)

    Hi there, thanks for the quick reply!

    Sure, a sample file would be:

    https://pwds.nhs.uk/wp-content/uploads/2021/09/SW-PIPC-Programme-Handbook-v14_.pdf

    And the page we have set up that people should land on is:
    https://pwds.nhs.uk/error-restricted-content/

    We followed the initial troubleshooting, however none of the scenarios there really fit this issue ??

    Thanks! Our .htaccess PDA section is below:

    BEGIN WordPress
    
    The directives (lines) between "BEGIN WordPress" and "END WordPress" are
    
    dynamically generated, and should only be modified via WordPress filters.
    
    Any changes to the directives between these markers will be overwritten.
    
    Prevent Direct Access Rewrite Rules
    
    RewriteRule private/([a-zA-Z0-9]+)$ index.php?pda_v3_pf=$1 [L]
    RewriteCond %{REQUEST_FILENAME} -s
    RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit/[0-9]
    RewriteCond %{HTTP_USER_AGENT} !Twitterbot/[0-9]
    RewriteCond %{HTTP_USER_AGENT} !Googlebot/[0-9]
    RewriteRule wp-content/uploads/pda(\/[A-Za-z0-9@.\/&+-]+)+.([A-Za-z0-9_@.\/&+-]+)$ index.php?pda_v3_pf=$1&is_direct_access=true&file_type=$2 [QSA,L] Prevent Direct Access Rewrite Rules End Prevent Direct Access Prevent Hotlinking Rules RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^https://pwds.nhs.uk/ [NC]
    RewriteRule .(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|png|css|pdf)$ - [F] Prevent Direct Access Prevent Hotlinking Rules End


    Plugin Author BWPS Team

    (@buildwps)

    Hello @gkhillboro,

    Thanks for your response. It seems like the URL you shared is, before the file was protected. As the URL will change once the file is protected along with the location.

    Can you try to protect the file again after unprotecting it and then share the URL?

    Thread Starter gkhillboro

    (@gkhillboro)

    Hi, thanks, I’m not sure I follow.

    That’s the actual URL of the file.
    That’s the URL the people would have previously had access to, that we wanted shut down and redirected.
    That’s what appears in Google results if you search for this document

    pipc pwds pdf handbook
    =
    https://prnt.sc/f_STwkyHciDg

    Hope that helps clarify ??

    Plugin Author BWPS Team

    (@buildwps)

    Hello @gkhillboro,

    The search engine indexed the URLs before the file was protected. 

    Use the Google Search Console (previously known as Google Webmaster Tools) to request the removal of the old URL from Google’s search index. This will prompt Google to re-crawl your website and update its search results accordingly.

    You can utilize the Redirection plugin to redirect old URLs to new ones.
    For more detailed information, you can refer to the following link: https://preventdirectaccess.com/docs/blocks-google-search-indexing/

    Feel free to reach back should you need further assistance. You can contact us at support(at)wpfolio.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirect to WP 404 page not Server?’ is closed to new replies.