最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Redirect wordpress website's subpage to root

programmeradmin2浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

I have a website, let's call it billyweb, built with Wordpress. On the other side, the billyweb has a subpage called billyweb/blog. I want to move all the contents inside billyweb/blog to billyweb. My question is how do I redirect all the content links inside billyweb/blog?

For example: billyweb/blog/what-is-blogging.html redirected to billyweb/what-is-blogging.html.

One question again, how to ensure that the redirection works if the old link is clicked through a search engine?

Thanks.

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

I have a website, let's call it billyweb, built with Wordpress. On the other side, the billyweb has a subpage called billyweb/blog. I want to move all the contents inside billyweb/blog to billyweb. My question is how do I redirect all the content links inside billyweb/blog?

For example: billyweb/blog/what-is-blogging.html redirected to billyweb/what-is-blogging.html.

One question again, how to ensure that the redirection works if the old link is clicked through a search engine?

Thanks.

Share Improve this question edited Jun 10, 2019 at 19:35 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Jun 10, 2019 at 9:45 user169726user169726 11 1
  • css-tricks/snippets/htaccess/301-redirects – Max Yudin Commented Jun 10, 2019 at 9:53
Add a comment  | 

1 Answer 1

Reset to default 1

you have multiple options to achive this.

The easiest way is to use a redirection plugin like:

https://wordpress/plugins/redirection/

if you want to work without a additional plugin, you can use .htaccess redirection like mentioned earlier:

RewriteEngine On
RewriteRule ^/?blog/(.*)$ /$1 [R=301,L]
发布评论

评论列表(0)

  1. 暂无评论