PDA

View Full Version : How to redirect one page to another in Wordpress etc.



Fli
02-04-2017, 10:51 AM
For newbie webmasters i found the way to redirect.

Go to your File manager or login your FTP account and get into the directory where are folders wp-content,wp-includes.wp-admin

here find and open file .htaccess file. If is not there, then try to check if your File manager or FTP program has setting to show "dot files" or hidden files.

create new line on the beginning of the .htaccess file and add your redirect rule:


Redirect 301 /old-post/ http://www.yourwebsite.com/new-post/

This redirect can be used to redirect even to different domains.

Other option is to insert into a .php file:


header('Location: http://example.com/newfile.php' . $_SERVER['REQUEST_URI']);
(untested)

Barbara
09-13-2017, 07:14 AM
Hi,
You can use free Trash Duplicate and 301 Redirect WordPress plugin (http://pluginsforwordpresswebsite.blogspot.in/2016/08/trash-duplicate-and-301-redirect.html) for this purpose also. It will help you to find the duplicate post, pages, custom posts, etc. and delete that duplicates.

citywebngp
06-01-2020, 08:28 AM
Yes,you have to use 301 redirect wordpress plugin for redirecting one page to another.

kumkum
08-24-2021, 04:59 PM
We can use any plugin to redirect wordpress onepost to another or we can use .htaccess file to redirect.
If yo want to redirect from http to https then you can also do this in .htaccess file.

You can check this to redirect http to https in wordpress (https://hoststud.com/resources/how-to-manually-redirect-from-http-to-https-through-htaccess-file.444/).