Skip to content

Instantly share code, notes, and snippets.

@MustafaMagdi
MustafaMagdi / Container.php
Last active April 17, 2024 19:14 — forked from tlikai/container.php
PHP Dependency Injection Container
<?php
/**
* Class Container
*/
class Container
{
/**
* @var array
*/
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active July 23, 2024 10:22
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@enrikberisha
enrikberisha / .htpasswd
Last active May 18, 2018 12:12
.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
AuthType Basic
AuthName "BETA Site"
AuthUserFile "/var/www/vhosts/rederp.ch/html/_beta.rederp.ch/.htpasswd"
Require valid-user
</IfModule>
wk:$apr1$R.JuDQ11$V6oReBCgR7Jc52.JJG6n9/
@JustThomas
JustThomas / wordpress-multisite-internal-redirect-loop.md
Last active June 19, 2024 15:34
WordPress Multisite: How to fix error "too many redirects"

WordPress Multisite: How to fix error "Request exceeded the limit of 10 internal redirects"

I am running a WordPress multisite network with sub-directory setup. When I check my error.log file, it is full of entries like this one:

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'Limit InternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

The problem was, in my case, one specific rewrite rule in the .htaccess file.

Problem description