Articles of redirect

Redirect one domain to another

How can I make all requests to pages at go to the same page but on htaccess currently looks like this… <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>

301 Rewriting htaccess

I have list of url’s to redirect using htaccess. from my OLD domain to New domain. i have done this in my htaccess RewriteEngine on RewriteCond %{HTTP_HOST} !^$ RewriteRule ^(.*)$$1 [R=301,L] RewriteEngine on RewriteCond %{HTTP_HOST} !^$ RewriteRule ^(.*)$$1 [R=301,L] redirection working fine, But i want something like to and i did […]

How i can put $_GET codes in function.php?

if(isset($_GET[“link”])){ $link = $_GET[“link”]; header(“Location $link”); } this my redirection codes. i put this code in function.php but not working. Example link: http://localhost/?link= How can i do it for working?

Redirect old query string URLs to new add_rewrite_rule URL

I have a custom page like this: /show/ is a WordPress page with a postid of 540. I added a rewrite rule to convert the URL to: Here’s the code I’m using in my theme’s functions.php for the rewrite: add_action( ‘init’, ‘init_custom_rewrite’ ); function init_custom_rewrite() { add_rewrite_rule( ‘^show/([^/]*)/([^/]*)/?’, ‘index.php?page_id=540&id=$matches[1]&n=$matches[2]’, ‘top’ ); } add_filter(‘query_vars’, […]

Custom redirect user after login based on metadata

I have a problem and would like some help: Scenario: Table: wp_usermeta According to the table above (wp-usermeta), which function could I use for all users with Special Plan after login being redirected to the page, Super plan users being redirected to the page and users of the Vip plan being redirected to […]

Custom form redirect after login

I have a custom form for logging in (in a modal window) that looks like this: <form name=”loginform” id=”loginform” action=”<?php echo wp_login_url( get_permalink() ); ?>/wp-login.php” method=”post”> <p class=”login-username”> <label for=”user_login”>Username or Email Address</label> <input type=”text” name=”log” id=”user_login” class=”input” value=”” size=”20″> </p> <p class=”login-password”> <label for=”user_pass”>Password</label> <input type=”password” name=”pwd” id=”user_pass” class=”input” value=”” size=”20″> </p> <p class=”login-submit”> […]

WooCommerce get_author_posts_url() – Author URL redirecting to shop base

I’ve noticed that when I have WooCommerce enabled and use get_author_posts_url() it automatically redirects to the ‘shop base’ when the user’s role is Customer. When I change the user to Subscriber get_author_posts_url() works correctly. I’ve disabled all plugins to systematically identify what was causing the issue and can confirm that it’s only when WooCommerce is […]

My redirect URL doesn't show any pages on my website

I recently started using WordPress. To do so I installed wordpress on my FTP server. Everything is working perfectly fine so far, except for my page URL. My FTP server’s URL is really complicated so I bought an domain name and redirected it to the FTP server. The site is called . However, because […]

Stop forcing certain paths to end with a forward slash

As far as I understand, WordPress prefers a trailing slash at the end of your URL. However, it applies this rule also to, so I get a 301 Redirect to Unfortunately, Google Search Console now complains of: Content mismatch between AMP and canonical pages (Critical) And my “error” is the HTTP 301 redirect […]

WordPress permalink, stop redirection

I’m having some hard-time with with WordPress permalinks. WordPress 3.1 seems to force url redirection, ex: This is the correct post url: If I go to any of the url’s below WordPress is redirecting me to the url above or Basically, what I want to achieve is that WordPress matches the post […]