When i try to enter subdomain i’m redirected to main domain
When i try to enter subdomain i’m redirected to main domain
When i try to enter subdomain i’m redirected to main domain
redirect from old URL structure
You can filter the login_redirect function like so, adapt according to your needs. add_filter(‘login_redirect’, ‘redirect_previous_page’, 10, 1); function redirect_previous_page( $redirect_to ){ global $user; $request = $_SERVER[“HTTP_REFERER”]; if ( in_array( $user->roles[0], array( ‘administrator’) ) ) { return admin_url(); } elseif ( in_array( $user->roles[0], array( ‘subscriber’) ) ) { return $request; } return $redirect_to; } Update 1: … Read more
How can I disable redirect domains?
After looking for the problem for a while, I decided to search in the MySQL database for the word “contact”, and I noticed that a table called wp_redirection_items indeed contained an entry which redirected from /blog/ to /blog/contact. A quick Google search has led me to this page, explaining the problem – it’s caused by … Read more
As t31os said, first thing you should do is disable all plugins, see if wp-admin/post-new.php works fine then, and re-enable them one by one, see which one is causing trouble. I would start with the plugin to change the admin theme, since this is the closest one to the admin dashboard.
It is no problem that the posts are already gone, we will hook into WP before it queries the database. First we set up our rewrite rules, which will set a special query variable (that we must declare public), and then, in the parse_request action, we check for that variable and redirect if it is … Read more
I am not sure if that is cause of your issue, but you do not load WordPress in correct way. Please see Integrating WordPress with Your Website in Codex for details.
Ok, that’s WordPress’ standard .htaccess file – because all the sites use a common virtual root (think single folder) all domains are using the .htaccess code. Basically you need to rewrite the code to use separate instructions for each domain e.g. this would send a request for newdomain.com to a specific page. # Internally rewrite … Read more
Taking a look at the WordPress HTTP API, it seems there ain’t no simple way to do this. In fact, it might even be a calling for a trac ticket. See, although it allows you to specify the maximum number of redirects, there’s no abstract option to control if redirects should even be followed. So … Read more