Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
6 views

How to 301 redirect from url with post id to permalink with post name (slug)?

my posts have urls of two different types: one with post id and other with post slug: /post/789 /post/my-post-slug i'm doing this using: add_rewrite_rule( 'post/(\d+)/?', 'index.php?p=$...
0
votes
1answer
30 views

My site doesn't redirect from HTTP to HTTPS

I have SSL certificate activated on my website. I did change the settings: setting > general and edit wp-config.php to force HTTPS: define( 'FORCE_SSL_ADMIN', true ); The problem is, the ...
0
votes
0answers
14 views

Redirects to wrong address after logging in

Few days ago, I couldn't access admin page of my WP website, When I clicked buttons 'log in' or 'Get new password', it redirects to another IP address, not my domain or hosted IP address. I think ...
0
votes
0answers
16 views

Private School Application Form

I'm attempting to set up a new application form for a client whose current form was done by a previous developer with jquery. It seems to only work with PHP versions of 5.6 or below. I'm not familiar ...
0
votes
1answer
22 views

How to allow download url redirection only if user logged in Wordpress site?

I'm trying to allow url-redirection (from /dl urls) only if user is logged-in to wordpress site. Otherwise don't allow. However it went "page not found" when i click these urls with or without logging ...
0
votes
1answer
18 views

How to auto login after registration?

I create an user using $user_id = wp_create_user($username, $password, $email); After creating the user I want them to auto login and so according to ravi patel, I have added the following code in ...
0
votes
1answer
13 views

Unable to properly login

First of all, sorry if the question is not clear the first time, it's a bit tricky to explain. Here's the issue i've got: I have a website running locally with mamp pro. Site name is dev.site (the ...
0
votes
1answer
15 views

Redirect website domain (including all pages) to external URL after Popup message (few seconds)

I am new to wordpress and I have made custom code as below. Where I can place this custom code in wordpress. I want to redirect the website domain and all pages but wanted to display popup message for ...
0
votes
1answer
15 views

Disable Wordpress URL auto Redirect

Wordpress auto redirect http://example.com?lang=fa to http://example.com/?lang=fa how to stop that?
0
votes
2answers
18 views

Can't access wp-admin, redirects to http://%24domain/wp-admin/

I have a WordPress website on a Digital Ocean VPS which I've come back to and tried to log into the admin panel through the 'wp-admin' link. For some reason I can't access it now. The website gets ...
0
votes
2answers
18 views

wordpress redirect error in xampp

i had a wordpress website on xampp let's say in "localhost/listing" and it was working perfectly then i installed another copy of this website on "localhost/mylisting" now the problem is that when i ...
2
votes
1answer
22 views

Why specific file directory fails to redirect but its parent folder succeeds?

I activated multisite using subdirectories on my old WordPress site, and I created a new site (say my-example.com/new-site/). I found links such as my-example.com/new-site/wp-content/mu-plugins/css/ ...
1
vote
0answers
217 views

How to fix the woocommerce - adaranth.com redirection issue [closed]

I have faced some redirect issue regarding my wordpress site. My wordpress site product category pages redirect to some unwanted sites (adaranth.com and some other site) Anyone let me know how to ...
0
votes
1answer
15 views

Reverse count page view and show on other page

is there any php function for the child theme or plugin that makes the following possible in wordpress: Page A shows number 16 Website visitor visits page B Page A shows number 15 I would like to ...
0
votes
0answers
12 views

Can't remove a 302 redirect that was created automatically after changing domain

So I inherited a multisite instance and I've changed the domain from example.co to example.com. A 302 redirect that takes you from the old domain to the new domain was automatically created. This is ...
0
votes
0answers
9 views

Wordpress Multisite Login Redirecting Too Many Times

I know that this question has been asked before, but none of the solutions that I have found has solved my problem. I just installed a brand new multi site from scratch on my IIS server using sub ...
0
votes
0answers
12 views

Competing Login Redirects - Need to be Combined?

I currently have two login redirects in my general-functions.php file in my mu-plugins directory for my multisite installation. The first one is for someone who logs in from a specific page. That ...
0
votes
0answers
21 views

301 redirects after changing permalinks

I've recently changed my permalink structure from /%category%/%post_id%/ to /%category%/%postname%/. I've also switched from Yoast to The SEO Framework plugin. Prior to making that switch, I deleted ...
-3
votes
0answers
23 views

Force http on a worpdress website

I'm trying to force all pages to load over http on a wordpress website (I know, a backwards way of thinking, but situational). What's the best way to do this when none of the following htaccess rules ...
0
votes
2answers
54 views

Redirect from https to http or from http to https? [on hold]

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 ...
1
vote
1answer
29 views

Woocommerce redirect thankyou page based on product ID doesn't empty Cart

In WooCommerce, I am using the following code to redirect users to custom thank you page after purchase of specific product. It gets the Product ID then redirects based on that ID. I've pasted the ...
0
votes
1answer
28 views

Postback redirect through add_action is not triggered

template: <form action="<?php echo esc_url( admin_url('admin-post.php')); ?>" method="post"> <input type="text" name="boo" id="boo" required> <input type="hidden" name="...
0
votes
0answers
2 views

301 .htaccess wordpress sub-level [migrated]

I am trying to redirect third and fourth level links to second level. /page/subpage/subpage should go to domain.de/newpage/ /page/subpage/ should also go to domain.de/newpage/ I tried it with this ...
1
vote
1answer
15 views

Redirect user to previous page after signup from custom form

I've looked on here and found lots of references to this, but none have worked for me, probably because there must be something in the custom code I am modifying that I don't quite understand. Having ...
0
votes
0answers
13 views

Redirection Plugin: Change permalink structure to remove date, want to retain and pass query strings (?utm_)

I have changed the permalink structure from /%year%/%monthnum%/%postname%.html to /%postname%/ I have added the following regex rule to the Redirection plugin: Source URL: ^/([0-9]{4})/([0-9]{2})/([^...
0
votes
0answers
31 views

Wordpress site not forcing from http to https instead getting redirected too many times

This is what I have done so far. In the settings in the admin I have updated the url to https e.g https://www.example.com But if i was to visit a page for example https://www.example.com/contact-us ...
0
votes
0answers
18 views

Reverse Proxy wp-admin redirects to non-secure messed up URI

I have a working reverse proxy from one server to a WP Engine install. We are trying to get it to work with a single URI for the admin and front end. I am trying to determine if there is anything that ...
0
votes
0answers
19 views

Toggle Redirect Function On/Off With Checkbox

I am trying to set up a redirect that is toggleable via admin backend, using a checkbox. Here is my redirect function: function redirect_to_prelaunch_page() { if (get_current_user_id() == 0 &&...
1
vote
3answers
69 views

How to create a php url redirection for nicer links

I'm looking for a way to make a URL redirection for affiliate links on my website. Something like : site.com/go/keyword I know there is many plugins for doiing this, but i don't like plugin, and i ...
0
votes
1answer
15 views

My wordpress site has “https://” on it but when I go to Dashboard and click visit site, it removes the “https://”

We have an internal website that is accessible only if you have an office 365 employee logins. It's hosted on bluehost and we have activated the https feature of it. Our site is running on WordPress ...
0
votes
1answer
27 views

Check if user has custom post published redirection on WordPress

I am trying to run a check when a user visits a certain page to see if the current user has a published or draft posts of a custom post type. If they do, then I'm trying to redirect them. I've found ...
1
vote
1answer
31 views

Headless Wordpress redirect front-page to login page [closed]

Is there any way to redirect https://example.com/ to https://example.com/admin with .htaccess ? I'm using WordPress only for the API.
1
vote
1answer
56 views

WordPress Redirect Not Working - AJAX Callback Response Not Picked Up

I cannot get a redirect working in my custom wordpress plugin. I have a button on a page which triggers an AJAX action which calls a function. In my function (which is definitely being called as I ...
0
votes
0answers
18 views

REST API pages filter by slug redirecting on certain slugs

Im encountering a super weird issue when using the REST API. When fetching a single page by slug i use the following url: wp-json/wp/v2/pages?slug=XXX where XXX is the slug of the page. Now this ...
0
votes
0answers
45 views

Display a custom 404 page without a redirect

In a plugin I want to display a specific page without redirecting (and thus without changing the URL) like the plugin https://wordpress.org/plugins/404page/ does. I can capture 404s and redirect them, ...
0
votes
1answer
25 views

Add to array, redirect and display

I want add text to array and display after redirect and unset array. public function save($type, $value){ global $tab; $tab[] = array('type' => $type, 'value' => $...
1
vote
1answer
61 views

Landing Page Redirect Chain | http->https->https www

I am getting this error for redirect chain on GTMetrix when I check my website. The chain is as follows: http:// https:// https://www. I am using this plugin for HTTPS https://wordpress.org/...
0
votes
0answers
36 views

How to redirect user to the specific URL and display notice

I want to redirect users upon registration, login, or any operation, to a specific page. If the user does something something like click "go back", the displayed notice should disappear. What ...
0
votes
0answers
16 views

Homepage (domain) that redirects user toward two subdomains based on his/her preferred language

I want to have a domain (e.g. website.com) that upon reaching that, the user decides the language he wants to continue. I planned for two languages. SEO doesn't matter for me. so what do you recommend?...
0
votes
1answer
45 views

redirect not work

I have class: class users{ public function __construct(){ add_action('do_redirect', 'redirect'); } public function redirect(){ $url = get_site_url(null, '/welcome'...
0
votes
1answer
27 views

How to make front page temporarily show content of internal page

I'm building a Wordpress site with /blog/ as the posts page, with ACF and other options on the page. Client wants to launch the blog part of the site on their current non-wordpress site as a ...
1
vote
1answer
50 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
0answers
28 views

How can I force the user to log in, even if they're already authenticated?

I am creating a link to a Wordpress page. In this scenario, multiple users may use the same machine and get confused about who is logged in, so every time they follow the link they must be forced to ...
1
vote
1answer
42 views

Specific URL has 403 Forbidden status code

I'm debugging a Belgian WP website: slotenmakerbelgie.com. The problem is that I get a forbidden status on a specific URL: slotenmakerbelgie.com/error/ (with and without trailing slash at the end) I ...
0
votes
1answer
24 views

How to get user details by name

I am new in WordPress. I want to get user details on frontend without login in WordPress when the user types his name in browser URL (Like example.com/{user-name}) and hit enter, User redirect a new ...
0
votes
1answer
26 views

There is 1 redirect

I tried all the ways to skip this problem , my website on wordpress http://www.b-secrets.ro and I keep getting There is 1 redirect http://b-secrets.ro/ redirects to https://www.b-secrets.ro/ I ...
0
votes
1answer
15 views

Redirect all users to dashboard unless custom post type

I am trying to redirect any visitors to the dashboard unless they land on a specific custom post type (fruits). So the following URLs would all redirect to the dashboard... https://www.example.com/...
0
votes
1answer
38 views

Contact Form 7 If Condition

I have used the following code to successfully redirect a form to an URL after submission using contact form 7. <add_action( 'wp_footer', 'redirect_cf7' ); function redirect_cf7() { ?> <...
1
vote
0answers
29 views

Built-In Postname Redirection vs Hard Redirects in relation to SEO and performance

It seems that many Wordpress users, even very experienced ones, aren't aware that, in normal circumstances, with pretty permalinks enabled, an inexactly written or superficially non-matching URL will ...
0
votes
1answer
19 views

Display Freebie Page Content only if Referrer is from Form Page

What is the best way to protect a page offering a free download after a viewer has filled out a form? I am using Contact Form 7 and Download Monitor on a Genesis theme. Some of the things that came to ...