One page is redirected to home and I don’t understand why
One page is redirected to home and I don’t understand why
One page is redirected to home and I don’t understand why
One of the ways to do this is by using mod_rewrite. Open your .htaccess file and add this code before the # BEGIN WordPress line: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^aritcles/(.*)$ /$1 [R=301,NC,L] RewriteRule ^news/(.*)$ /$1 [R=301,NC,L] RewriteRule ^reviews/(.*)$ /$1 [R=301,NC,L] </IfModule>
WordPress Redirects Old Post Url to New Related Post
I had the exact same problem, and I believe that was probably caused because WordPress doesn’t know about the primary category (that is something added by Yoast SEO instead). So is something that in my opinion Yoast SEO should manage, hopefully in next releases they’ll do it. In the meanwhile it looks I’ve smoothly resolved … Read more
wordpress handle this using rewrite rules. in fact worpdress does redirect /bar to /foo/bar by default but it’s need rewrite rules to be configured correctly. maybe some plugin or custom rules is interrupting the default rewrite rules. try click on Save Changes in Settings > Permalink and see if auto redirect is fixed or not.
You can do it with the “template_redirect” hook. For multisite or simple WordPress. e.g: add_action(‘template_redirect’, function(){ $user = wp_get_current_user(); $userRoles = $user->roles; $url = site_url(); if(!in_array(‘administrator’, $userRoles) && !is_front_page()){ wp_redirect($url); exit; } }); EDIT is_front_page() will work only if “Front page displays” is set. Use is_home() if not. EDIT #2 Accordind with our discuss below, … Read more
Take a look at your wp-config.php file. For a subdomain installation, you should have something like this: define(‘MULTISITE’, true); define(‘SUBDOMAIN_INSTALL’, true); define(‘DOMAIN_CURRENT_SITE’, ‘rareteas.com’); define(‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/”); define(‘SITE_ID_CURRENT_SITE’, 1); define(‘BLOG_ID_CURRENT_SITE’, 1); If you have SUBDOMAIN_INSTALL set to false, change it to true, which is necessary for a subdomain multisite. Next, take a look at your database. Sometimes … Read more
Recommend using htaccess to take care of SSL redirects as needed. Will prevent ‘mixed content’ errors. I don’t think WP does any redirects, other than to get the content. If your settings have non-SSL, that’s what people will get. Using htaccess will prevent problems.
How to redirect non admin user after login
Have you considered to create a symlink from your document root (wordpress) directory to the directories in upper levels? You’ll need to uncheck the “Restrict the ability to follow symbolic links” checkbox in Plesk Hosting & DNS > Apache & Nginx Settings for that to work.