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 questionI 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 questionI 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
1 Answer
Reset to default 1you 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]