cachify.hdd.htaccess.php - should generate right variables
Hello, thank you for you work.
In wp-config.php I have some personal changes
define( 'WP_DEFAULT_THEME', 'custom' );
define( 'ADMIN_COOKIE_PATH', '/admin' ); /*Im using /admin url */
define( 'SITECOOKIEPATH', '/' );
define( 'TEST_COOKIE', WP_DEFAULT_THEME . '_test' );
define( 'LOGGED_IN_COOKIE', WP_DEFAULT_THEME . '_logged_RANDOM' );
define( 'SECURE_AUTH_COOKIE', WP_DEFAULT_THEME . '_sec_RANDOM' );
define( 'AUTH_COOKIE', WP_DEFAULT_THEME . '_RANDOM' );
define( 'PASS_COOKIE', WP_DEFAULT_THEME . 'pass_RANDOM' );
define( 'USER_COOKIE', WP_DEFAULT_THEME . 'user_RANDOM' );
define( 'RECOVERY_MODE_COOKIE', WP_DEFAULT_THEME . '_rec_RANDOM' );
/* RANDOM is hash */
Also I have
define( 'WP_CONTENT_DIR', WEB_ROOT . '/app' );
So these lines
RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-content/cache)/.*
RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
Shoul be generated over LOGGED_IN_COOKIE, admin_url(), WP_CONTENT_DIR
Thank you.
also there should be LOGGED_IN_COOKIE
private static function _is_logged_in() {
/* Logged in */
if ( is_user_logged_in() ) {
return true;
}
/* Cookie? */
if ( empty( $_COOKIE ) ) {
return false;
}
/* Loop */
foreach ( $_COOKIE as $k => $v ) {
if ( preg_match( '/^(wp-postpass|wordpress_logged_in|comment_author)_/', $k ) ) {
return true;
}
}
return false;
}
@Zodiac1978 Hi Zodiac, Sorry for the interruption, but can this be edited please? Thank you.
@1ucay Can you provide a PR? Then someone can review your changes and maybe we can merge it with less time commitment. Thanks in advance.
I could have a look at this somewhere around the weekend, doesn't look like a big deal. But I'm also happy to "just" review a PR 😉