{"id":61376,"date":"2024-02-13T07:22:14","date_gmt":"2024-02-13T12:22:14","guid":{"rendered":"https:\/\/memberpress.com\/docs\/advanced-rule-features\/"},"modified":"2025-01-22T06:59:38","modified_gmt":"2025-01-22T11:59:38","slug":"advanced-rule-features","status":"publish","type":"ht_kb","link":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/","title":{"rendered":"Funciones avanzadas de las reglas"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Regex\u00a0<\/h2>\n\n\n\n<p>For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called \u201c<strong>myfolder<\/strong>\u201c, you could use <strong>^\/myfolder\/.*<\/strong> to protect it.<\/p>\n\n\n\n<p>For the regex users, the matches happen from $_SERVER[\u2018REQUEST_URI'], which means anything in the URL after the domain. Accordingly, <strong>if your WordPress is in a subdirectory<\/strong>, you must <strong>add the subdirectory folder to your pattern<\/strong>. <\/p>\n\n\n\n<p>For example, let's say your website is located in the <strong>\/members\/<\/strong> subdirectory (https:\/\/yourdomain.com<strong>\/members\/<\/strong>). Thus, for any folder on this website, the pattern must start with <strong>^\/members\/<\/strong> prefix (e.g. <strong>^\/members\/myfolder\/.*<\/strong>).<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note<\/strong>: To protect folders in this way, you must use MemberPress rules set to the <strong>Custom URI<\/strong> type.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Partial Content Codes<strong>\u00a0<\/strong><\/h2>\n\n\n\n<p>Do you want to protect some paragraphs, images, or even <a href=\"http:\/\/docs.memberpress.com\/article\/155-protecting-widgets\" target=\"_blank\" rel=\"noopener\">hide widgets<\/a> on a page from unauthorized members, but leave the rest of the page available to everyone? Well, MemberPress makes that easy! Each Rule and Membership you create comes with a <strong>Shortcode<\/strong> and <strong>PHP Snippet<\/strong> which you can use to hide selected portions of your content based on that individual rule or by content associated with your Memberships.<\/p>\n\n\n\n<p>The <a href=\"http:\/\/docs.memberpress.com\/article\/112-available-shortcodes\" target=\"_blank\" rel=\"noopener\">Shortcodes<\/a> will be the most commonly used as they will work on all WordPress Pages, Posts, and Custom Post Types. Shortcodes look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[mepr-active rule=\"1\" ifallowed=\"show\"] ... [\/mepr-active]<\/code><\/pre>\n\n\n\n<p>Any content between the opening and closing part of the shortcode and simply will be protected from unauthorized users. <\/p>\n\n\n\n<p>The rule=\u201d1\u2033 part is where you specify the ID of the Rule that should be applied to this protected content. The <em>ifallowed=\u201dshow\u201d<\/em> part is where you specify whether to show or hide this partial content if the user has access.<\/p>\n\n\n\n<p>The\u00a0shortcode has also <strong>unauth <\/strong>parameter that can be used like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[mepr-active rule=\"1\" ifallowed=\"show\" unauth=\"message\"]Anything in-between gets protected[\/mepr-active]<\/code><\/pre>\n\n\n\n<p>If set to <strong>unauth=\u201dmessage\u201d<\/strong> \u2013 the user will be shown the unauthorized message when they are not authorized. If set to <strong>unauth=\u201dlogin\u201d<\/strong> \u2013 the user will see the login form when they are unauthorized. If set to <strong>unauth=\u201dboth\u201d<\/strong> \u2013 the user will see the default unauthorized message followed by the login form. <\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note<\/strong>: when set to, \u201cmessage\u201d or, \u201cboth\u201d AND the rule has a custom unauthorized message it will display the custom unauthorized message from the rule instead of the global one.<\/p>\n\n\n\n<p>Using both <em>ifallowed=\u201dshow\u201d<\/em> and <em>ifallowed=\u201dhide\u201d<\/em> on the same page is a great way to show teaser content to guests and unauthorized members, but then hide that teaser content after they have paid and logged in and instead show the full premium content.<\/p>\n\n\n\n<p>If you want to leave a mental note for yourself on the backend of your site you can add a third part to this shortcode which looks like <em>description=\u201dgold_membership_only\u201d<\/em>. <\/p>\n\n\n\n<p>This way you can easily remember when looking over your page or post six months or more later what this shortcode was for. Be sure to only use letters, numbers, and underscores for the description. Spaces and quotes can cause unexpected results. Here's an example with a description included: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[mepr-active rule=\"1\" ifallowed=\"show\" description=\"gold_membership_only\"]Anything in-between gets protected[\/mepr-active]<\/code><\/pre>\n\n\n\n<p>The PHP Snippet is for advanced users who may want to protect some partial content inside of a WordPress template, theme file, or even widgets. The PHP Snippet is a simple if statement that needs to be formatted like the following examples: <\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Note: Only <strong>one<\/strong> of the parameters below can be applied per code snippet.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>PHP Snippet<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>rule(s)<\/td><td>If you plan to use a single Rule ID, then set this to rule=\u201dX\u201d. If you plan to use multiple Rule ID's, then set this to rules=\u201dX, XX, XXX\u201d. Where X's = the ID's of the Rule(s). <a class=\"fancybox image\" href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2024\/02\/file-HtoE5yUT1J.png\" target=\"_blank\" rel=\"noopener\">Where to find a Rule's ID?<\/a> An example could be <strong><?php if(current_user_can(\u2018mepr-active','rule:1\u2032)): ?><\/strong>Content to protect<strong><?php endif; ?><\/strong> or <strong><?php if(current_user_can(\u2018mepr-active','rules:1,2,3\u2032)): ?><\/strong>Content to protect<strong><?php endif; ?><\/strong> for more than one rule.<\/td><\/tr><tr><td>membership(s)<\/td><td>If you plan to use a single Membership ID, then set this to membership=\u201dX\u201d. If you plan to use multiple Membership ID's, then set this to memberships=\u201dX, XX, XXX\u201d. Where X's = the ID's of the Membership(s). <a class=\"fancybox image\" href=\"https:\/\/memberpress.com\/wp-content\/uploads\/2024\/02\/file-UVTUwhgyga.png\" target=\"_blank\" rel=\"noopener\">Where to find a Membership's ID?<\/a> Examples of this could be <strong><?php if(current_user_can(\u2018mepr-active','membership:1\u2032)): ?><\/strong>Content to protect<strong><?php endif; ?><\/strong> or <strong><?php if(current_user_can(\u2018mepr-active','memberships:111,222,333\u2032)): ?><\/strong>Content to protect<strong><?php endif; ?><\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon\"><strong>Note<\/strong>: You can also find these snippets for each rule you create when clicking the button \u201cPartial Content Codes\u201d when creating a new rule or editing an existing one.<br><br><img decoding=\"async\" src=\"https:\/\/memberpress.com\/wp-content\/uploads\/2024\/02\/file-MFpGYpsKc6.png\" alt=\"\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Regex\u00a0 For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called \u201cmyfolder\u201c, you could use ^\/myfolder\/.* to protect it. For [\u2026]<\/p>\n","protected":false},"author":62252,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_strive_editorial_status":"not-started","_strive_copy_of":0,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_FSMCFIC_featured_image_caption":"","_FSMCFIC_featured_image_nocaption":"","_FSMCFIC_featured_image_hide":"","_strive_checklists":"\"\"","_strive_active_checklist":"62291e2bb2422","footnotes":""},"ht-kb-category":[1322],"ht-kb-tag":[],"class_list":{"0":"post-61376","1":"ht_kb","2":"type-ht_kb","3":"status-publish","4":"format-standard","6":"ht_kb_category-protecting-content","7":"entry","8":"has-post-thumbnail"},"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.5.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"Regex For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called &quot;myfolder&quot;, you could use ^\/myfolder\/.* to protect it. For\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Nikola M\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.5.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"MemberPress\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Advanced Rule Features | MemberPress\" \/>\n\t\t<meta property=\"og:description\" content=\"Regex For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called &quot;myfolder&quot;, you could use ^\/myfolder\/.* to protect it. For\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1650\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1275\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-02-13T12:22:14+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-01-22T11:59:38+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/memberpress\/\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@memberpress\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Advanced Rule Features | MemberPress\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Regex For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called &quot;myfolder&quot;, you could use ^\/myfolder\/.* to protect it. For\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#article\",\"name\":\"Advanced Rule Features | MemberPress\",\"headline\":\"Advanced Rule Features\",\"author\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/blog\\\/author\\\/nikolacaseproof-com\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/file-MFpGYpsKc6.png\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#articleImage\",\"width\":928,\"height\":184},\"datePublished\":\"2024-02-13T07:22:14-05:00\",\"dateModified\":\"2025-01-22T06:59:38-05:00\",\"inLanguage\":\"es-ES\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#webpage\"},\"articleSection\":\"Protecting Content\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/memberpress.com\\\/es\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/doc-categories\\\/general\\\/#listItem\",\"name\":\"General\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/doc-categories\\\/general\\\/#listItem\",\"position\":2,\"name\":\"General\",\"item\":\"https:\\\/\\\/memberpress.com\\\/es\\\/doc-categories\\\/general\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/doc-categories\\\/protecting-content\\\/#listItem\",\"name\":\"Protecting Content\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/doc-categories\\\/protecting-content\\\/#listItem\",\"position\":3,\"name\":\"Protecting Content\",\"item\":\"https:\\\/\\\/memberpress.com\\\/es\\\/doc-categories\\\/protecting-content\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#listItem\",\"name\":\"Advanced Rule Features\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/doc-categories\\\/general\\\/#listItem\",\"name\":\"General\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#listItem\",\"position\":4,\"name\":\"Advanced Rule Features\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/doc-categories\\\/protecting-content\\\/#listItem\",\"name\":\"Protecting Content\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/#organization\",\"name\":\"MemberPress\",\"description\":\"The All-In-One WordPress Membership Plugin\",\"url\":\"https:\\\/\\\/memberpress.com\\\/es\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/mp-icon-RGB_Icon-01.jpg\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#organizationLogo\",\"width\":1650,\"height\":1275,\"caption\":\"memberpress logo icon\"},\"image\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.instagram.com\\\/memberpress\\\/\",\"https:\\\/\\\/www.pinterest.com\\\/memberpressplugin\\\/\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/MemberPressPlugin\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/memberpress\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/blog\\\/author\\\/nikolacaseproof-com\\\/#author\",\"url\":\"https:\\\/\\\/memberpress.com\\\/es\\\/blog\\\/author\\\/nikolacaseproof-com\\\/\",\"name\":\"Nikola M\",\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/memberpress.com\\\/wp-content\\\/litespeed\\\/avatar\\\/1edf820c48f9c430f380efe81887b154.jpg?ver=1775141118\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#webpage\",\"url\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/\",\"name\":\"Advanced Rule Features | MemberPress\",\"description\":\"Regex For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called \\\"myfolder\\\", you could use ^\\\/myfolder\\\/.* to protect it. For\",\"inLanguage\":\"es-ES\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/docs\\\/advanced-rule-features\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/blog\\\/author\\\/nikolacaseproof-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/blog\\\/author\\\/nikolacaseproof-com\\\/#author\"},\"datePublished\":\"2024-02-13T07:22:14-05:00\",\"dateModified\":\"2025-01-22T06:59:38-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/#website\",\"url\":\"https:\\\/\\\/memberpress.com\\\/es\\\/\",\"name\":\"MemberPress\",\"description\":\"The All-In-One WordPress Membership Plugin\",\"inLanguage\":\"es-ES\",\"publisher\":{\"@id\":\"https:\\\/\\\/memberpress.com\\\/es\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>Advanced Rule Features | MemberPress<\/title>\n\n","aioseo_head_json":{"title":"Funciones avanzadas de las reglas | MemberPress","description":"Regex Para usuarios avanzados, puedes activar la opci\u00f3n regex para proteger cualquier cosa que coincida con tu expresi\u00f3n. El \u00fanico car\u00e1cter que no puede utilizarse en la casilla regex es la almohadilla (#). Todos los dem\u00e1s son seguros. As\u00ed, por ejemplo, para proteger un directorio llamado \"micarpeta\", puedes utilizar ^\/micarpeta\/.* para protegerlo. En","canonical_url":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#article","name":"Advanced Rule Features | MemberPress","headline":"Advanced Rule Features","author":{"@id":"https:\/\/memberpress.com\/es\/blog\/author\/nikolacaseproof-com\/#author"},"publisher":{"@id":"https:\/\/memberpress.com\/es\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/uploads\/2024\/02\/file-MFpGYpsKc6.png","@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#articleImage","width":928,"height":184},"datePublished":"2024-02-13T07:22:14-05:00","dateModified":"2025-01-22T06:59:38-05:00","inLanguage":"es-ES","mainEntityOfPage":{"@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#webpage"},"isPartOf":{"@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#webpage"},"articleSection":"Protecting Content"},{"@type":"BreadcrumbList","@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es#listItem","position":1,"name":"Home","item":"https:\/\/memberpress.com\/es","nextItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es\/doc-categories\/general\/#listItem","name":"General"}},{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es\/doc-categories\/general\/#listItem","position":2,"name":"General","item":"https:\/\/memberpress.com\/es\/doc-categories\/general\/","nextItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es\/doc-categories\/protecting-content\/#listItem","name":"Protecting Content"},"previousItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es\/doc-categories\/protecting-content\/#listItem","position":3,"name":"Protecting Content","item":"https:\/\/memberpress.com\/es\/doc-categories\/protecting-content\/","nextItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#listItem","name":"Advanced Rule Features"},"previousItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es\/doc-categories\/general\/#listItem","name":"General"}},{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#listItem","position":4,"name":"Advanced Rule Features","previousItem":{"@type":"ListItem","@id":"https:\/\/memberpress.com\/es\/doc-categories\/protecting-content\/#listItem","name":"Protecting Content"}}]},{"@type":"Organization","@id":"https:\/\/memberpress.com\/es\/#organization","name":"MemberPress","description":"The All-In-One WordPress Membership Plugin","url":"https:\/\/memberpress.com\/es\/","logo":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg","@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#organizationLogo","width":1650,"height":1275,"caption":"memberpress logo icon"},"image":{"@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#organizationLogo"},"sameAs":["https:\/\/www.instagram.com\/memberpress\/","https:\/\/www.pinterest.com\/memberpressplugin\/","https:\/\/www.youtube.com\/c\/MemberPressPlugin","https:\/\/www.linkedin.com\/company\/memberpress\/"]},{"@type":"Person","@id":"https:\/\/memberpress.com\/es\/blog\/author\/nikolacaseproof-com\/#author","url":"https:\/\/memberpress.com\/es\/blog\/author\/nikolacaseproof-com\/","name":"Nikola M","image":{"@type":"ImageObject","url":"https:\/\/memberpress.com\/wp-content\/litespeed\/avatar\/1edf820c48f9c430f380efe81887b154.jpg?ver=1775141118"}},{"@type":"WebPage","@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#webpage","url":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/","name":"Advanced Rule Features | MemberPress","description":"Regex For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called \"myfolder\", you could use ^\/myfolder\/.* to protect it. For","inLanguage":"es-ES","isPartOf":{"@id":"https:\/\/memberpress.com\/es\/#website"},"breadcrumb":{"@id":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/#breadcrumblist"},"author":{"@id":"https:\/\/memberpress.com\/es\/blog\/author\/nikolacaseproof-com\/#author"},"creator":{"@id":"https:\/\/memberpress.com\/es\/blog\/author\/nikolacaseproof-com\/#author"},"datePublished":"2024-02-13T07:22:14-05:00","dateModified":"2025-01-22T06:59:38-05:00"},{"@type":"WebSite","@id":"https:\/\/memberpress.com\/es\/#website","url":"https:\/\/memberpress.com\/es\/","name":"MemberPress","description":"The All-In-One WordPress Membership Plugin","inLanguage":"es-ES","publisher":{"@id":"https:\/\/memberpress.com\/es\/#organization"}}]},"og:locale":"es_ES","og:site_name":"MemberPress","og:type":"article","og:title":"Advanced Rule Features | MemberPress","og:description":"Regex For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called &quot;myfolder&quot;, you could use ^\/myfolder\/.* to protect it. For","og:url":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/","og:image":"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg","og:image:secure_url":"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg","og:image:width":1650,"og:image:height":1275,"article:published_time":"2024-02-13T12:22:14+00:00","article:modified_time":"2025-01-22T11:59:38+00:00","article:publisher":"https:\/\/www.facebook.com\/memberpress\/","twitter:card":"summary_large_image","twitter:site":"@memberpress","twitter:title":"Advanced Rule Features | MemberPress","twitter:description":"Regex For advanced users, you can enable the regex option to protect anything that matches your expression. The only character that cannot be used in the regex box is the hash (#). All others are safe to use. So, for example, to protect a directory called &quot;myfolder&quot;, you could use ^\/myfolder\/.* to protect it. For","twitter:image":"https:\/\/memberpress.com\/wp-content\/uploads\/2022\/10\/mp-icon-RGB_Icon-01.jpg"},"aioseo_meta_data":{"post_id":"61376","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"seo_analyzer_scan_date":"2025-10-09 21:34:02","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"open_ai":"{\"title\":{\"suggestions\":[],\"usage\":0},\"description\":{\"suggestions\":[],\"usage\":0}}","ai":null,"created":"2024-02-13 12:22:14","updated":"2026-03-03 14:53:49"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/memberpress.com\/es\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/memberpress.com\/es\/doc-categories\/general\/\" title=\"General\">General<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/memberpress.com\/es\/doc-categories\/protecting-content\/\" title=\"Protecting Content\">Protecting Content<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tAdvanced Rule Features\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/memberpress.com\/es"},{"label":"General","link":"https:\/\/memberpress.com\/es\/doc-categories\/general\/"},{"label":"Protecting Content","link":"https:\/\/memberpress.com\/es\/doc-categories\/protecting-content\/"},{"label":"Advanced Rule Features","link":"https:\/\/memberpress.com\/es\/docs\/advanced-rule-features\/"}],"_links":{"self":[{"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/ht-kb\/61376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/users\/62252"}],"replies":[{"embeddable":true,"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/comments?post=61376"}],"version-history":[{"count":2,"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/ht-kb\/61376\/revisions"}],"predecessor-version":[{"id":70255,"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/ht-kb\/61376\/revisions\/70255"}],"wp:attachment":[{"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/media?parent=61376"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/ht-kb-category?post=61376"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/memberpress.com\/es\/wp-json\/wp\/v2\/ht-kb-tag?post=61376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}