WordPress multisite htaccess redirection to new domain

RewriteCond %{HTTP_HOST} ^site.olddomain.com/wp-content/uploads/sites/2$ The HTTP_HOST server variable contains just the hostname (the value of the Host HTTP request header). It does not contain the URL-path, so the above condition is never going to match. But the site_id in new domain is 2. But your directive appears to be trying to do the opposite… checking for … Read more

How does WordPress redirect without using .htaccess?

The literal answer to your question is that wordpress uses wp_redirect() to perform redirects. You can see the source here https://developer.wordpress.org/reference/functions/wp_redirect/ The implied part of your question — about how wordpress decides when to do so — is a bit more complicated and might be influenced by plugins such as yoast. But, for example, if … Read more

How to create a 301 redirect that doesn’t apply to subsites

You’ll need to use mod_rewrite (RewriteRule and RewriteCond) directive(s) instead, as opposed to a mod_alias Redirect directive, in order to check the requested Host header. For example, try the following near the top of the .htaccess file, before the # BEGIN WordPress section (the order of directives is important): RewriteCond %{HTTP_HOST} ^foo\.org [NC] RewriteRule ^events$ … Read more

Redirects from Tumblr to new WP

Hey, you might have luck with a prior plugin I wrote (here’s the code itself). It’s a redirect plugin that looks at the URL coming in, checks it against the postmeta table if it’s about to produce a 404, and redirect the user if a match is found. If you have the entire URI stored … Read more

Moving variables from one page to another

you could POST the shop id to the target page. otherwise- cookie, session. or just fetch it on the list page via ajax. edit – a simple post request via a form: in your source page: <form action=”b.php” method=”post”> <input type=”hidden” name=”id” value=”42″ /> <input type=”submit” /> </form> in the target page b.php: <?php if( … Read more

Too many redirects when using wp super cache [closed]

It’s a cache problem. See if the cache directory is writable (it should be 755), try to empty it and try again. Another cause might be the combination of CURL extension and enabled open_basedir. Check with your host. Another solution might be to try the “Permalink Fix & Disable Canonical Redirects Pack” plugin – http://wordpress.org/extend/plugins/permalink-fix-disable-canonical-redirects-pack/

How to redirect user to a page after form submission

Please make sure these is no data output or blank spaces above wp_redirect( $final_url ); exit; otherwise this warning will always appear. Also optionally you can use <?php //Php code ?> <script type=”text/javascript”> document.location.href=”http://example.com”; </script> <?php //php code ?>