View .htaccess examples
#Do not copy&paste whole file, find only interesting parts! | |
#HTTP authentification | |
AuthType Basic | |
AuthName "Log in" | |
AuthUserFile /path/to/.htpasswd | |
Require valid-user | |
#Security headers |
View gist:252bbbd51006714ce0b3f4fe9892fd93
add_filter( 'wp_image_editors', 'lynt_wp_image_editors' ); | |
function lynt_wp_image_editors( $editors ) { | |
//return array( 'WP_Image_Editor_GD' ); //only GD | |
//return array( 'WP_Image_Editor_Imagick' ); //only Imagick | |
} |
View fbclid-nginx.conf
http { | |
... | |
# redirect map in http block - remove fbclid argument from the end | |
map $request_uri $redirect_fbclid { | |
"~^(.*?)([?&]fbclid=[a-zA-Z0-9_-]+)$" $1; | |
} | |
... |
View fbclid.htaccess
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{QUERY_STRING} ^(.*?)(&?fbclid=[a-zA-Z0-9_-]+)$ | |
RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301] | |
</IfModule> |
View wp-config-part-1-show.php
define( 'WP_DEBUG', true ); | |
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true ); |
View 1-common.txt
info.php | |
phpinfo.php | |
php_info.php | |
php-info.php | |
i.php | |
test.php | |
debug.php | |
admin.php | |
administrace.php | |
administration.php |
View .htaccess
RewriteRule "(^|/)\.(?!well-known\/)" - [F] |
View path.php
<?php | |
echo realpath(__FILE__); |
View lynt-admin.php
<?php | |
/** | |
* Plugin Name: Lynt Admin | |
* Author: Vladimir Smitka | |
* Author URI: https://lynt.cz/ | |
* License: GNU General Public License v3 or later | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
defined( 'ABSPATH' ) or die( 'nothing here' ); |
View remove_sensitiver_rest.php
//Remove sensitive data from REST API | |
function lynt_remove_sensitive_data_from_rest( $response ) { | |
if(!current_user_can('list_users')){ | |
//get WP_REST_Response | |
$data = $response->get_data(); | |
//unset sensitive fields | |
if(preg_replace('/[\W]+/', '',$data['name']) == preg_replace('/[\W]+/', '',$data['slug'])) $data['name']="Author"; | |
unset($data['link']); |
NewerOlder