PDA Status & Rewrite Rules

Rewrite rules play an indispensable role in how our PDA works. That’s why you should implement them correctly in order for our plugin to work properly.

Rewrite Rules:

Our PDA Gold officially supports Apache, IIS (Windows) and NGINX servers at the moment.

While our rewrite rules are inserted automatically for Apache servers, you have to implement these rules manually for IIS (Windows) and NGINX servers.

Sometimes, our plugin won’t be able to detect which server is actually serving your static files. You have to contact your hosting provider to get the actual server and implement the correct rewrite rules accordingly.

PDA Status

PDA Status shows whether our plugin is working as expected at a particular time:

    • Our plugin is up and running 
    • Our plugin is working with some limitations
      • Raw URLs option is enabled AND
      • You haven’t blocked access to our “_pda” folder
    • Our plugin isn’t working due to incorrect rewrite rules
      • Raw URLs option is disabled AND
      • Our rewrite rules are not implemented correctly
    • Our plugin isn’t working properly due to incorrect Raw URLs setup
      • Our plugin fails to remove our .htaccess file from the _pda folder

Raw URLs Limitations

Our Raw URLs comes in useful when you’re using WordPress.com or NGINX servers that don’t allow modifying rewrite rules. However, it comes with some limitations:

  • Those who could somehow get the original file URL will be able to access your private files directly
    https://preventdirectaccess.com/wp-content/uploads/_pda/2019/04/ToDo-List.pdf
  • Our Robots meta tag and X-Robots-Tag HTTP header to block search indexing will no longer be working

What’s still working:

  • Your File URLs still follow our File Access Permission
  • Robots.txt rules are still in place to stop Google and search engines from crawling your private files

In order to overcome these limitations, you have to block access to our _pda folder.

How to block access to “_pda” folder

Once the Raw URLs option is enabled, you have to block access (all requests) to our private _pda folder for PDA Gold to work thoroughly. There are 2 ways to do so:

  1. Put the following .htaccess rules under wp-content/uploads/_pda folder for Apache and NGINX servers that support .htaccess like Cloudways
    Order deny, allow
    Deny from all

    Once our Raw URLs option is OFF, you should remove the .htaccess file under our _pda folder. Our plugin will do this automatically for Apache servers. In case it somehow fails, you may want to remove it manually.

  2. Implement our rewrite rules for NGINX instead of using Raw URLs in the first place.
Lasted updated on July 17, 2019