admin管理员组文章数量:1130349
I moved WordPress out of the root of my server into a special folder of its own and now Google is indexing my posts together with that special WordPress folder thus creating some 404 error issues.
For example let's say my WordPress core files are installed in / but the home page is /.
This post link / works fine and has been indexed by Google. Unfortunately, Google is also indexing ://www.example/hello-world/435/ thus creating 404 errors in Google Search console.
So my question is, is there a way to use .htaccess to make links like ://www.example/hello-world/435/ to redirect to the right link which is /?
I moved WordPress out of the root of my server into a special folder of its own and now Google is indexing my posts together with that special WordPress folder thus creating some 404 error issues.
For example let's say my WordPress core files are installed in https://www.example/wordpress/ but the home page is https://www.example/.
This post link https://www.example/hello-world/435/ works fine and has been indexed by Google. Unfortunately, Google is also indexing https://www.example/wordpresshttps://www.example/hello-world/435/ thus creating 404 errors in Google Search console.
So my question is, is there a way to use .htaccess to make links like https://www.example/wordpresshttps://www.example/hello-world/435/ to redirect to the right link which is https://www.example/hello-world/435/?
1 Answer
Reset to default 0I've fixed it using the rule below
RewriteRule ^(.*)wordpresshttps:/www.example/(.*)$ https://www.example/$2 [L,R=301]
I moved WordPress out of the root of my server into a special folder of its own and now Google is indexing my posts together with that special WordPress folder thus creating some 404 error issues.
For example let's say my WordPress core files are installed in / but the home page is /.
This post link / works fine and has been indexed by Google. Unfortunately, Google is also indexing ://www.example/hello-world/435/ thus creating 404 errors in Google Search console.
So my question is, is there a way to use .htaccess to make links like ://www.example/hello-world/435/ to redirect to the right link which is /?
I moved WordPress out of the root of my server into a special folder of its own and now Google is indexing my posts together with that special WordPress folder thus creating some 404 error issues.
For example let's say my WordPress core files are installed in https://www.example/wordpress/ but the home page is https://www.example/.
This post link https://www.example/hello-world/435/ works fine and has been indexed by Google. Unfortunately, Google is also indexing https://www.example/wordpresshttps://www.example/hello-world/435/ thus creating 404 errors in Google Search console.
So my question is, is there a way to use .htaccess to make links like https://www.example/wordpresshttps://www.example/hello-world/435/ to redirect to the right link which is https://www.example/hello-world/435/?
1 Answer
Reset to default 0I've fixed it using the rule below
RewriteRule ^(.*)wordpresshttps:/www.example/(.*)$ https://www.example/$2 [L,R=301]
本文标签: redirectHow To Fix 404 errors caused by Google Indexing Wordpress In Subdirectory
版权声明:本文标题:redirect - How To Fix 404 errors caused by Google Indexing Wordpress In Subdirectory 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749027138a2305281.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论