简体   繁体   English

将wordpress网站重定向到首页

[英]Redirect wordpress site to homepage

I would like to redirect my WordPress website to the homepage 我想将我的WordPress网站重定向到首页

For example, when the user goes to the following address 例如,当用户转到以下地址时

mywebsite.com mywebsite.com

It will redirect to 它将重定向到

mywebsite.com/homepage mywebsite.com/homepage

What is the best way to do it? 最好的方法是什么?

Thanks 谢谢

  1. Go to Administration > Settings > Reading panel . 转到 Administration > Settings > Reading panel
  2. Set Front page displays to a static page 首页显示设置为静态页面
  3. In the drop down menu for Front Page select "Home." 在下拉菜单头版选择“家”。
  4. In the drop down menu for Posts page select "Blog" or the name you created, or leave it blank if you will not feature posts on the site. 在“ 帖子”页面的下拉菜单中,选择“博客”或您创建的名称,如果您不打算在网站上发布帖子,则将其保留为空白。
  5. Save changes. 保存更改。

在此处输入图片说明

在此处输入图片说明

Usage of Redirection plugin will do the trick for you. 使用重定向插件将为您解决问题。 and It is one of the very Easiest method. 这是最简单的方法之一。

Plugin: https://wordpress.org/plugins/redirection/ 插件: https//wordpress.org/plugins/redirection/

Install this plugin and you will find the settings page and you can provide the URL over to there. 安装此插件,您将找到设置页面,并且可以在此处提供URL。

After Installation of the Plugin it will appear on Tools Menu under the Admin Dashboard. 安装插件后,它将显示在管理控制台下的“工具”菜单上。

Using .htaccess : 使用.htaccess:

RewriteRule mywebsite.com$ mywebsite.com/homepage [R=301,L] RewriteRule mywebsite.com $ mywebsite.com/homepage [R = 301,L]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM