Created
August 17, 2022 20:06
-
-
Save lukecav/2bebfad7ce5a5fb63fca63117a7758bf to your computer and use it in GitHub Desktop.
MemberPress plugin rewrite rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # BEGIN MemberPress Rules | |
| <IfModule mod_rewrite.c> | |
| RewriteCond %{HTTP_COOKIE} mplk=([a-zA-Z0-9]+) | |
| RewriteCond /var/www/somesite.com/wp-content/uploads/mepr/rules/%1 -f | |
| RewriteRule ^(.*)$ - [L] | |
| RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-includes|wp-content/plugins|wp-content/themes) | |
| RewriteCond %{REQUEST_URI} \.(zip|gz|tar|rar|doc|docx|xls|xlsx|xlsm|pdf|mp4|m4v|mp3|ts|key|m3u8|ZIP|GZ|TAR|RAR|DOC|DOCX|XLS|XLSX|XLSM|PDF|MP4|M4V|MP3|TS|KEY|M3U8)$ | |
| RewriteRule . /wp-content/plugins/memberpress/lock.php [L] | |
| </IfModule> | |
| # END MemberPress Rules |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.memberpress.com/article/179-understanding-rewrite-rules
https://docs.memberpress.com/article/243-mp-downloads-add-on#protecting-files