📄 Viewing: addManualRedirectTop.html

<style>
    .add_a_redirect_label {
        font-weight: bold;
    }
</style>


<BR/>
<hr style="border-bottom: 1px dashed black;" />
<h3 id="add_manual_redirect" style="margin-top: 0px; margin-bottom: 0px;" >{Add a Manual Redirect}</h3>

<form method="POST" name="add-manual-redirect-top" 
      action="{addManualRedirectAction}" onsubmit="return validateAddManualRedirectForm(event);" >
<input type="hidden" name="action" value="addRedirect">

<!-- - - - - - - - - - - - - - - - - - - - match this URL -->
<BR/>
<label class="add_a_redirect_label" for="manual_redirect_url">{URL}:</label>
<input id="manual_redirect_url" placeholder="{urlPlaceholder}" style="width: 45%;" type="text" name="manual_redirect_url" value="{postedURL}" required> {(Required)}
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="is_regex_url" id="is_regex_url" value="1">
<label for="is_regex_url">{Treat this URL as a regular expression}</label> 
<a id="showInfoLink" onclick="showHideRegexExplanation()" href="javascript:void(0);">{(Explain)}</a>
<a id="hideInfoLink" onclick="showHideRegexExplanation()" href="javascript:void(0);" style="display: none;">{(Hide Info)}</a>

<BR/>
<div id="regex_explanation" style="display: none; margin-left: 100px;">
<span style="font-style: italic;">
<p>{When checked, the text is treated as a regular expression.} 
<span style="font-weight: bold;">{Note that including a bad regular expression or one that takes too long will break your website.}</span>
{So please use caution and test them elsewhere before trying them here. If you don't know what you're doing please don't use this option (as it's not necessary for the functioning of the plugin).}</p>

<p>{Example}: &nbsp;&nbsp;&nbsp;<span style="font-weight: bold;">/events/(.+)</span></p>
<p>
<span style="font-weight: bold;">/events/(.+)</span> {will match any URL that begins with} 
<span style="font-weight: bold;">/events/</span> {and redirect to the specified page.}
{Since a capture group is used, you can use a $1 replacement in the destination string of an external URL.}
</p>

<p>
{First, all of the normal "exact match" URLs are checked, then all of the regular expression URLs are checked.}
</p>    
</span>
</div>

<script>
    function showHideRegexExplanation() {
        var hiddenBlock = document.getElementById("regex_explanation");
        var hideInfoLink = document.getElementById("hideInfoLink");
        var showInfoLink = document.getElementById("showInfoLink");
        if (hiddenBlock.style.display === "none") {
            hiddenBlock.style.display = "block";
            hideInfoLink.style.display = "inline";
            showInfoLink.style.display = "none";
            
        } else {
            hiddenBlock.style.display = "none";
            hideInfoLink.style.display = "none";
            showInfoLink.style.display = "inline";
        }
    }
</script>

<BR/>

🌑 DarkStealth — WP Plugin Edition

Directory: /home/httpd/html/matrixmodels.com/public_html/wp-content/plugins/404-solution/includes/html