URL Redirection issue, Please help me out.

Thunder Digitals

Elite Member
Jr. VIP
Joined
Jun 9, 2020
Messages
6,750
Reaction score
3,311
Hello guys, One of my client's websites has a URL redirection issue. The domain is redirecting like this domain. com/login/?redirect_to=https%3A%2F%2Fdomain.com%2F

But my client wants to be like this domain. com/login

Please tell me how do I fix it.

Thanks a lot.
 
Without seeing the actual domain, there's nobody who can tell you how to fix this issue.

This most likely happens when you come on a page that requires you to login. After logging in, it will redirect you back to the page that asked your visitor to log in - which is a good thing.
 
Without seeing the actual domain, there's nobody who can tell you how to fix this issue.

This most likely happens when you come on a page that requires you to login. After logging in, it will redirect you back to the page that asked your visitor to log in - which is a good thing.
I want to say that redirection is not working properly. How do I fix that? Is there any plugin do I have to use?
 
I want to say that redirection is not working properly. How do I fix that? Is there any plugin do I have to use?
How is it not working properly? As Blackhat Lifter stated, that URL looks like the standard WordPress process for when a user accesses a page that requires them to login, once they login they are redirected to the page they tried to access.

Perhaps your client changed their domain name or something, and the WordPress redirect url is still using the old domain name, is this the case? Then your client needs to check the SQL database to make sure WordPress is using the new domain name.
 
How is it not working properly? As Blackhat Lifter stated, that URL looks like the standard WordPress process for when a user accesses a page that requires them to login, once they login they are redirected to the page they tried to access.

Perhaps your client changed their domain name or something, and the WordPress redirect url is still using the old domain name, is this the case? Then your client needs to check the SQL database to make sure WordPress is using the new domain name.
Bro it is like this:

This is my client website domain. com

And it is redirected to like this domain. com/login/?redirect_to=https%3A%2F%2Fdomain.com%2F

But my client wants to be like this domain. com/login

And yes it is required to log in to access the website And I want to solve login page URL redirection.
 
Bro it is like this:

This is my client website domain. com

And it is redirected to like this domain. com/login/?redirect_to=https%3A%2F%2Fdomain.com%2F

But my client wants to be like this domain. com/login

And yes it is required to log in to access the website And I want to solve login page URL redirection.
If there's some sort of login.php file for the page, try adding something like this at the top of that file

Code:
<?php
if (strpos($_SERVER['REQUEST_URI'], 'redirect') !== false) {
    header('Location: https://www.domain.com/login/');
}
?>
 
If there's some sort of login.php file for the page, try adding something like this at the top of that file

Code:
<?php
if (strpos($_SERVER['REQUEST_URI'], 'redirect') !== false) {
    header('Location: https://www.domain.com/login/');
}
?>
Ok I will try this
 
Back
Top