first of all - sorry for my bad english. Im trying to change the Backend-URL from /wp-admin/
to /admin/
as example.
im using
define('WP_ADMIN_DIR', "admin");
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR);
add_filter('site_url', 'wpadmin_filter', 10, 3);
function wpadmin_filter( $url, $path, $orig_scheme ) {
$old = array( "/(wp-admin)/");
$admin_dir = WP_ADMIN_DIR;
$new = array($admin_dir);
return preg_replace( $old, $new, $url, 1);
}
and for .htaccess
RewriteEngine on
RewriteRule ^admin/(.*) wp-admin/$1?%{QUERY_STRING} [L]
Well, this went fine for me two days ago. But since today its not working anymore.
Wordpress is logging me out after im going for xxxx.xx/admin/
.
Cant even Login because of redirects(?). The Login-form is just resetting. j4i: i despair.. ive looked up any related thread on stackoverflow Thanks for any help or advice in advance,
Angelos
well. i fixed it.
define('WP_ADMIN_DIR', "admin");
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR);
this entry has to be in wp-config.php
.
Ive wrote it in my plugin and obviously its not working.
thanks anyway <3