Changeset 2423402
- Timestamp:
- 11/23/2020 08:05:48 AM (5 years ago)
- Location:
- redirect-editor/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
redirect-editor.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
redirect-editor/trunk/readme.txt
r2379993 r2423402 5 5 Tags: redirect, improve security, hacking, wordpress security, wp security, SEO, security plugin, redirection, htaccess, 6 6 Requires at least: 3.0 7 Tested up to: 5.5. 17 Tested up to: 5.5.4 8 8 Stable tag: trunk 9 9 License: GPLv2 or later … … 53 53 1. Redirect editor is easy to use, you just type in the page you want redirected as shown in the example and then put the link to where we are redirecting to. It is the simplest redirect tool for seo and gives an accurate 301 response for WP. The other features help secure your site and currently happen in the background without any interaction, besides activating the plugin. 54 54 55 == 2.3.7 == 56 improved redirects! 55 57 56 58 == 2.3.6 == -
redirect-editor/trunk/redirect-editor.php
r2379993 r2423402 3 3 /* 4 4 Plugin Name: Search Engine Optimization Redirect Editor 5 Version: 2.3. 65 Version: 2.3.7 6 6 Plugin URI: https://planetzuda.com 7 7 Description: If you need to redirect whether for search engine optimization purposes or otherwise you can use our app to redirect to any page. We provide a direct link to your xml sitemap which you can submit to search engines manually. We protect you against popular SEO plugins that damage your rankings by making your sitemap invisible to Google's bots by telling them to not index it, which is a free and automatically applied feature. More search features are coming. Our redirect editor is extremely useful and highly secure, which has been tested in bug bounties by white hat hackers, including our security and seo company. … … 329 329 330 330 /* currently only allowing text, but will be adding in more support in the future. */ 331 public function PZ_security_protection() 332 { 333 331 332 public function PZ_security_protection() 333 { 334 $disable_api = $this->get_setting('disable_api'); 334 335 $_req_uri = esc_url($_SERVER["REQUEST_URI"]); 335 336 if (preg_match('/^.*\/wp-json*/', $_req_uri) && $disable_api === 1) { 337 338 wp_redirect(get_home_url(), 301); 339 exit(); 340 } 341 } 342 public function redirect($query) 336 337 if(isset($disable_api)){ 338 $disable_api= intval($disable_api); 339 } 340 add_action('pre_get_posts', array( 341 $this, 342 'redirect' 343 )); 344 345 if (preg_match('/^.*\/wp-json\/*/', $_req_uri) && $disable_api === 1) { 346 347 348 349 if (current_user_can('edit_posts')) { 350 add_action('wp_head', 'rsd_link'); // add really simple discovery link 351 add_action('wp_head', 'wlwmanifest_link'); // add windows live writer link 352 add_action('wp_head', 'wp_shortlink_wp_head', 10); 353 354 add_action('the_generator', 'erase_header_junk'); // add it 355 } 356 } 357 } 358 359 public function redirect($query) 343 360 { 344 361 if ($query->is_main_query() && ! current_user_can('manage_options') || $query->is_main_query() && current_user_can('manage_options')) { … … 358 375 359 376 360 361 377 ?>
Note: See TracChangeset
for help on using the changeset viewer.