Questions tagged [redirect]

"HTTP Redirection" – the process by which a request for one URL is automatically replaced by a request for a different, usually related, URL.

Filter by
Sorted by
Tagged with
3
votes
1answer
165 views

Redirect members to custom page upon logging in through WP admin

When a members logs in through WP admin, I would like to redirect them instantly to a custom URL. What will I need to change to make this possible? Respond with step-by-step details would be ideal.
3
votes
2answers
10k views

redirect does not work in ajax function

I'm using ajax to post the form data. In the end I want to redirect to homepage. I'm trying following code, it does not work. It returns error 302. How can I redirect in the following function? Thanks....
3
votes
2answers
26k views

Redirection Plugin: Redirect all URLs with a regular expression

I understand little about regular expressions, but I need to figure one out to use with the Redirection plugin which supports redirects with regular expressions. http://urbangiraffe.com/plugins/...
2
votes
5answers
28k views

Redirect to current page after wordpress login

I just want to redirect the users to their current page after logged in my wordpress website. I have used the following but it won`t work for me since it is in page that created from the admin side. ...
2
votes
2answers
8k views

How to turn off redirection from 'domain.com/login' to 'domain.com/wp-login.php'

I want to install something different than wordpress under 'mydomain.com/login', but WordPress automatically redirecting this link '/login' to '/wp-login.php'. Where can I turn off this redirection?
2
votes
1answer
5k views

Stop unwanted WP redirection to new url

I had a custom type post, for which I changed the url. I have refreshed permalinks and cleared site and browser cache. The old url now redirects to the new url automatically. Possibly because the post ...
2
votes
3answers
27k views

after login that will redirect user role into a page

I am trying to create a hook that when a user login, it check the user role.. if the user role is jsa_contributor then it redirect into specific page. but it seems my code didn't work. This is the ...
2
votes
1answer
4k views

Can't access admin dashboard with wp-admin without /index.php after it

After I log in, I'm redirected to example.com/wp-admin/, which has a "ERR_TOO_MANY_REDIRECTS" message. If I type in example.com/wp-admin/index.php, everything works just fine. My wp-config.php looks ...
2
votes
2answers
7k views

How to include parent terms in hierarchical taxonomy URLs?

For all custom taxonomies, the URLs look like: /base/slug/. I need a solution to for my hierarchical taxonomies to have: /base/parentslug/childslug/. Anybody knows how to redirect and or to have the ...
2
votes
2answers
8k views

How does Wordpress redirect to WooCommerce shop page? [closed]

I'm creating a plugin for WooCommerce, it needs a parameter in the url of shop page like this http://domain/wp/shop/?param=value. It worked fine until I set the shop page as front page, when I access ...
2
votes
1answer
1k views

WooCommerce lost password reset flow not working with SendGrid (redirect loop)

Leaving this here for anyone who runs into the same issue because I just spent a few hours to track this down and couldn't Google my way there: The WooCommerce reset password flow is broken. The ...
1
vote
1answer
658 views

Redirect to “All Posts” after post update or publish in Block Editor

When anyone presses Publish or Update from the Block Editor in a CPT, I would like them to be redirected to the CPT listing page. (Users are typically editing many of the CPT at once, so this will ...
1
vote
2answers
806 views

Redirecting category link to first child post

I am trying to redirect the category link to the first child post. I am using following code in category.php. This redirects, but link doesn't go to first child post. How can I redirect to the first ...
1
vote
1answer
59 views

Server (WordPress) redirects files that are not supposed to (using htaccess)

I use .htaccess to redirect some addresses or avoid some addresses to be redirected. Basically, I have all things redirected to another domain except for certain addresses that I specified. So example....
1
vote
1answer
45 views

htaccess redirect not working

I'd like to 301 redirect all .com/language/X URLs to .com/members/?members_search=X. Test case: http://example.com/language/french should 301 redirect to http://example.com/members/?members_search=...
1
vote
0answers
163 views

Wordpress within a subdirectory of another Wordpress environment doesn't work

Here's a summary of my scenario: I'm running Wordpress on a linux environment The root directory contains and index.php file that references the subdirectory where my main site's files are (codex ...
1
vote
5answers
24k views

Can't access wp-admin Internal Server Error 500

I suddenly can't access company.co.za/wp-admin, as it redirects to http://company.co.za/wp-login.php?redirect_to=http%3A%2F%company.co.za%2Fwp-admin%2F&reauth=1 with error 500 What should I do ...
1
vote
1answer
246 views

Set front page as static page [closed]

I am new to WP. I have installed WP in my local system with WAMP and trying to create my own theme. I have created pages and trying to set my "Home" page as front page and "Blogs" page as my posts ...
1
vote
1answer
351 views

Custom url structure for custom template

I have a custom taxonomy called activities and a custom role called operator. So, if example.com/operators/bird-watching is visited then I want to list all the operators that offers bird-watching. ...
1
vote
1answer
545 views

Redirect based on parameter in url

I want to redirect my site to the correct url based on parameter. The url is passed when changing the language of the site using the language switcher. If url contains lang=de, then redirect to ...
1
vote
1answer
523 views

wp_logout_url() redirects to confirmation page even with nonce?

I use wp_logout_url() to output a logout link. How can I avoid displaying the confirmation page that appears after clicking the link? <a href="<?= wp_logout_url(get_permalink()); ?>">Log ...
1
vote
1answer
2k views

How to pre-fill Google Forms URLs with logged-in WordPress user's data

We need to have our logged-in users' data (username , Email , First Name , Last Name) pre-fill the links to Google Forms existing on our site. Why? We have Google Forms spread out on our site that ...
1
vote
1answer
699 views

wp-login.php — redirect logged in users to custom URL

When the user visits /wp-login.php and is already logged in, how can I redirect them to a custom URL? I found the same question asked and answered, only relating on who to redirect to the admin panel ...
1
vote
1answer
367 views

Links to an exisiting Page are now redirecting to a draft page?

I have a page that has been working fine for a while now. However I'm looking to replace it in the not to distant future. (testing conversions) I though the correct process for this would be to ...
1
vote
2answers
114 views

How do I properly redirect outbound links with special characters

The search form on my website has a couple radio inputs for the user to select which source (all but one are external to the website) the search query should use. I retrieve those inputs (search ...
1
vote
1answer
2k views

Creating intro page in wordpress

I am trying to create a very simple "intro" page in wordpress which will display a 5 seconds video introduction and then will redirect to the homepage automatically. I saw that there are many plugins ...
1
vote
2answers
2k views

Display most recent post in category instead of archive?

I've successfully redirected my blog page to my most recent post - i.e. so when you click the 'blog' link in the nav it goes to the most recent post page and you can click next/prev buttons to ...
1
vote
4answers
1k views

Where does the 404 redirection happen?

Can someone please tell me where the 404 redirection occurs? I am wanting to redirect to a custom template.php instead of the 404 page. Is this possible to do? If it is can some one provide me with ...
1
vote
1answer
515 views

Custom Post Types Not acknowledged for date.php template

So my issue is this. I'm building a news site that needs to display several lists of links on the homepage for the current date. I've separated the different sections into custom post types for ease ...
1
vote
2answers
5k views

How to store media files in subdomain

In order to parallelize downloads, i created already a subdomain for images. images.mydomain.com Now, i don't know how to move my media files, without breaking attachments, and after that, in the ...
1
vote
3answers
234 views

301 Redirect Custom URL hierarchy to WordPress Posts

I am converting a custom built site into a WordPress site. Unfortunately, the custom site has a completely different URL structure, which we would like to set up 301 redirects for. The site receives ...
1
vote
4answers
15k views

Redirect user after login/registration globally

How it possible to redirect all users, even administrators after login to specific page? And also redirect users after successful registration? Any simplest way? For example I want to redirect users ...
0
votes
1answer
1k views

Landing Page - Redirect Loop?

Recently this solution was given (Thanks Mr.D), for this Wordpress redirect to landing page if not logged in thread <?php if($_SERVER['REQUEST_URI'] != '.../' || $_SERVER['REQUEST_URI'] != '.../'){...
0
votes
1answer
434 views

Temporary redirect prevents getting $_POST array

I'm sending a form from a woocommerce plugin. I've tweaked the thankyou.php page and added email sending functionality. However the $_POST array is empty. Inspecting with Chrome Dev Tools I found ...
0
votes
1answer
383 views

Redirecting old site links to new site

I'm hoping one of you WP gurus can help me out here... I have a website. Let's call it Jack.com I'm re-branding Jack as a girl, so I've made another website website - Jill.com I want all existing ...
0
votes
1answer
4k views

How to send “Location” header on plugin form submit event?

How to redirect to specified page after form was submitted? Warning: Cannot modify header information - headers already sent by (output started at wordpress\wp-admin\menu-header.php:94) in ...
0
votes
1answer
3k views

Redirecting users to referrer page after logging in using custom login form

I am using a custom wordpress login form using the following code. I have this form in the sidebar of my site: <?php if ( ! is_user_logged_in() ) { // Display WordPress login form: $args = ...
0
votes
1answer
36 views

WordPress on VirtualBox - no pretty permalinks

Right, this has me stumped. I cannot get the pretty permalinks to work. They go to 404. The permalinks are updating, I can see the URL change to each setting as I save them by going to a post, but ...
0
votes
1answer
740 views

Template redirect is_tax() not working

I'm trying to do a template redirect in my wordpress but with partial success function ahaali_qa_theme_redirect(){ global $wp; $plugindir = dirname(__FILE__); if(is_archive()){ ...
0
votes
1answer
140 views

How to make a redirection that fired a script before redirecting?

I have a software that I must host in an external server in a niche market (kind of extensions for browsers). I want to know how many people click on the link when I share it on social media. My idea ...
0
votes
1answer
3k views

Redirect to requested page after (custom) login

I am developing a WP site locally and I want the content to be viewable only to users that have logged in, except for the front page that's visible to everyone. When a non-logged in user clicks on a ...
0
votes
2answers
1k views

Plugin Redirect After Activation

I have create a plugin that I want to redirect to the options page of that plugin after the user activates it. This works fine when I test it locally. However, on a live installation of wordpress, it ...
0
votes
1answer
63 views

Redirection errors

I was trying to change how my website is routed by changing the URL from somebody's old host to mine. From bjj.iamrobbiegreen.com to gladiatorbjj.net under settings and site URL. I now cannot get ...
0
votes
2answers
834 views

Redirect from https to http or from http to https? [closed]

We have a WordPress blog, google is indexing http as well as https urls. Now we are considering to either redirect https to http, or to use https and redirect all http traffic there. And how can we ...
0
votes
2answers
494 views

I want to redirect the url to the previous page

I have created a table in which i have delete link something like http://localhost/wptheme/wp-admin/admin.php?page=batch-op-settings&action=batch-delete&post_id=5 and i have added a code to ...
0
votes
1answer
377 views

Redirect Old domain & posts to new domain homepage

I am closing my previous site so i want to redirect old domain's homepage & all posts to new domain's homepage. I tried using Cpanel redirect but it only redirects homepage not posts. I want to ...
0
votes
1answer
956 views

Load template inside a parent template

Inside of my current theme directory, I created a folder called "mobile" which contains a separate set of template files, all optimized for mobile. Now, say I setup a function that detects a mobile ...
0
votes
1answer
3k views

Search results URL without query string variables

Have a search page /search/ where we currently use URLs formatted like /search/?q=query for showing search results. Now we would like to show the search results with a URL like this /search/query/ ...
0
votes
1answer
742 views

How can I fix a slow redirect after form submit from frontend (no plugin)?

Below is the code I'm using for my short-coded form and to add the post. Here's a basic overview of the problem I'm trying to remedy: -This form is displayed on the page at /addmember/ -On this ...
0
votes
0answers
1k views

Redirect based on $_GET parameters

I'm coding a payment gateway plugin for a webshop. I'm having trouble redirecting the users to two different pages based on the order status. In the payment sent to the gateway I can add one ...