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
0answers
5 views

Login redirect and wp-admin link

I make custom login / registration. I want redirect when login administrator to admin page and when user to profile page. //add_action... public function redirectAdmin(){ $url = ...
0
votes
0answers
24 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
0answers
15 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 ...
0
votes
0answers
20 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
20 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
votes
0answers
12 views

Sort from Woocommerce Widget on front page don't redirect to correct page

Hi im using elementor to display the woocommerce widget [products limit="7" columns="4" paginate="true"] on front page of website. When click on ANY "sort by option" it redirect to blank page. ...
1
vote
0answers
26 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
22 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
24 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
13 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
26 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
28 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
16 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 ...
0
votes
0answers
14 views

Redirect Based on $_SERVER variable on multisite

i have multisite applied on our site split by subdirectory, example: www.example.com/ph/, www.example.com/my/, www.example.com/id/ I set a variable on the server to detect a user's country in $...
0
votes
0answers
9 views

After disabling Multisite, homepage redirects to non-existing page

I disabled Multisite. Deleted all wp-config lines, updated .htaccess with the default code and deleted all MySQL entries. Now my homepage - pitch.pt - keeps redirecting to pitch.pt/home2. All other ...
0
votes
1answer
44 views

Wordpress redirect loop on nginx + apache reverse proxy

I am trying to setup a fresh Wordpress installation on an nginx + apache reverse proxy configuration. My installation process was as follows: Installed nginx and apache servers Configured nginx (conf ...
0
votes
0answers
17 views

one post without https - redirection not working

All my pages and posts get redirected to https exept for one. I have the .htaccess below. The page is in category1. But when I remove the RewriteRule for category1, nothing changes. <IfModule ...
0
votes
1answer
17 views

wordpress redirects to front page when saving from admin area

I migrated my site to a new server. Everything seems to be fine, but the browser is redirected to the frontpage when I save configurations in either the "W3 Total Cache" plugin or in "Duplicate post" ...
0
votes
0answers
16 views

How to stop WordPress template_redirect from interfering with custom redirects?

WordPress has a 'template_redirect' feature that will 301 redirect visitors who request a page that does not exist, if it can find a page that closely matches the one originally requested. For ...
0
votes
0answers
17 views

Wordpress permalinks redirect

Why does not all of my old permalinks automaticly redirect to the new one. Here is an example. https://hostup.org/blog/2019/01/22/what-hosting-provider/ Does not redirect to https://hostup.org/blog/...
0
votes
0answers
14 views

Why would a 301 redirected RSS feed be appearing as an external link in search console?

We redirected our website over a year ago to a new domain. 301 is confirmed in place etc. All works fine. However a couple of RSS feed urls using the old domain have appeared in the external link ...
0
votes
1answer
25 views

Logout without confirmation and SAME window on mobile

I using this code to logout. It works except on mobile it opens a new window. How can I logout with confirmation and redirect to to the same window? add_action('check_admin_referer', '...
0
votes
0answers
13 views

redirect old permalink to the new one

I have wordpress blog and I changed my permalink to post name my old permalink was like this: example.com/id-postname example.com/123-post my new permalink is post name example.com/postname how ...
0
votes
1answer
37 views

index.php file keeps redirecting to a non-existent index.html file?

Every time I try and visit the index.php file on my website, it automatically redirects me to an index.html page. I have no redirects in .htaccess. My wordpress site is in a subdomain, but it ...
0
votes
0answers
15 views

How to remove /home from my site? i can't even access it from dashboard

sorry for my bad english. I have new design for my homepage, i create it in (https://bonolo.id/) URL and make it my homepage. it's working. but the problem is the old ones (https://bonolo.id/home/) ...
0
votes
1answer
23 views

Dynamic 404 page content while still keeping 404 status code?

I used Divi to build the layout for a custom 404 page. I'm using this plugin https://wordpress.org/plugins/redirect-404-error-page-to-homepage-or-custom-page/ to redirect 404 errors to this page. It ...
1
vote
3answers
26 views

How can I redirect my website's homepage to a random blog post?

I was trying to redirect my homepage to random blog post in WordPress. My aim is to redirect my viewers to random blog posts whenever they enter into my website. I couldn't find a proper solution, ...
1
vote
1answer
50 views

header and wp_redirect not working. cannot modify header information warning

Does anyone know another way to redirect without header(); giving me this error? wp_redirect doesn't work for me either... This is the error I'm getting: Warning: Cannot modify header information -...
0
votes
1answer
15 views

Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)

I can't find the answer for my question anywhere. I am trying to make a login redirect script, after login the user (depending on their role) will go to a certain page. I have currently a working ...
1
vote
2answers
39 views

Redirecting Pages That No Longer Exist — But Could in the Future

I have several 404 errors with a URL such as: myWebsite/tag/foo/page/4/. Page no longer exists because a few posts were deleted tagged as "foo." Which is better: 301 redirect that to myWebsite/tag/foo/...
0
votes
0answers
9 views

how to redirect folder and its subfolders to subdomain

i have a wordpress blog and i have changed my "uploads" folder to subdomain. My previous address was like this. https://guilaneman.ir/wp-content/uploads /.../.../ my new url: https://images....
0
votes
2answers
40 views

Solved: redirect to another page using functions.php

I want users to change their avatar on a general site, because some plugins only work with that. for example www.example.com/members/user1/profile/change-avatar/ And www.example.com/members/...
0
votes
0answers
11 views

Formatting CSV for Redirecting Drupal to WordPress URLs

I have a list of Drupal URLs in Col A of a CSV that have had words like "and" "or" "but" taken out of the URL string. I have a list of the same WordPress URLs in Col B CSV that have the entire URL ...
1
vote
0answers
26 views

permalink structure postname and wp internal routing (301 vs 404) [duplicate]

I don't understand the following behavior: to verify, I have a fresh default/standard wp installation (no themes, no plugins) I change in settings the permalink structure to "post name". I create ...
0
votes
1answer
26 views

redirect to https://my-site/wp-admin/ instead of https://my-site/wordpress/wp-admin/ after options updating

I installed my plugin for one of my clients but I got a bug. In my plugin settings page using the wordpress settings system, when I click on the submit button to activate a license key, the ...
0
votes
0answers
20 views

Redirect after login when WordPress in subdirectory

I've a problem in my Wordpress website which is after I login from /wp-admin I didn't redirected to anywhere just keep seeing the login page without any errors. it was working fine when the site was ...
0
votes
1answer
46 views

Restrict access to admin-post.php

I have a form that hooks into admin_post_nopriv, after this hook has completed, the user is logged in. Now, there is a bug that occurs when the user has this form open in two separate tabs, completes ...
0
votes
1answer
16 views

Submit New Post

I'm the junior of wordpress and web designer, there is a stupid question would like to ask. At the wordpress web site, when I create new post and submit. The page will fallback to edit post page. But ...
0
votes
0answers
14 views

How to 301 redirect from one url to another properly

We have recently done a massive migration from a custom CMS to Wordpress CMS however want to figure out the right way to do 301 redirects from a situation where their previous URLs did not have any ...
0
votes
1answer
17 views

Custom Route Returns 301/Passing Variable from Input

I'm trying to register a custom route to validate a groupon voucher code for a landing page. I registered the route in functions.php like so: // Adding Custom Voucher Route add_action('...
0
votes
1answer
22 views

Wp-admin Redirection loop after moving to subdirectory

I've moved my Wordpress files from public_html to a subdirectory public_hmtl/my-site.com. I've changed my .htaccess in the public_html directory by RewriteEngine on RewriteCond %{HTTP_HOST} ^my-site....
0
votes
2answers
24 views

How to use login_redirect with a user capability

The following code should redirect the user to a specific page if they have the manage_woocommerce capability or higher - but it doesn't and just goes to the main dashboard. add_filter( '...
0
votes
0answers
94 views

Redirect a login form, if referer contains URL query string parameter

I am trying to redirect a default WP login form, if it's HTTP referer contains some specific query string parameter. Scenario: I need to redirect new users (the ones who just created their passwords ...
0
votes
1answer
15 views

Redirect based on referer using Advanced Custom Fields

Im currently trying to protect some WP pages by assigning a specific template to them. Ive created the ACF fields "Referring URL" and "Redirect URL", as these could alter depending which page the ...
0
votes
1answer
16 views

Non-www is redirect to admin page

The website is redirecting domain.com (non-www) to the admin login page. I don't want that. www.domain.com is showing the website in a correct way. Anyone knowing the problem with the non-www ? ...
1
vote
2answers
20 views

How To Fix 404 errors caused by Google Indexing Wordpress In Subdirectory

I moved WordPress out of the root of my server into a special folder of its own and now Google is indexing my posts together with that special WordPress folder thus creating some 404 error issues. ...
0
votes
1answer
27 views

How to create mass 301 redirects with PHP in Nginx server without using a WP plugin

New on Nginx based web server setup and finding a way to create mass 301 redirects in a WP site without using any plugins. It is fairly easy in Apache based web server as you only need to put this at ...
0
votes
1answer
50 views

Redirect 301 of old urls to wordpress urls

I am migrating a website from vivvo cms to wordpress. Vivvo is using category pages like index.numberofthepage.html I want to redirect urls like using regex: https://www.example.com/mycats/index.200....
1
vote
1answer
20 views

redirect automatic page that serves custom posttype content

I registered blog as a custom post type. This content is queried on the page page-actueel-blog. But mydomain.com/blog also serves content (by default titles are queried). I don't want visitors to ...
0
votes
0answers
22 views

How to redirect to specific url if contains specific text in url?

I am new in WordPress and I am trying to create a plugin that redirects to the target by picking up the same post from source URL to target URL. The user just needs to enter the URL he wants to ...