the Google SEO considerations over using .htaccess rule to ignore top level directory

a 夏天 提交于 2020-01-25 03:28:12

问题


I am using the Concrete 5 CMS to build a website and i'd like to push it live.

I have the code in a directory called /concrete5.5.2.1 and rather than updating the references in the database and moving the code on the filesystem, i'm considering using an .htaccess rule to effectively ignore that directory.

However, I'm keen to know if doing something like this below would mean that Google would index the /concrete5.5.2.1? Or would this be ignored?

RewriteEngine On 
RewriteRule ^concrete5.5.2.1/(.+)$ http://www.ayrshireminis.com/$1 [R=301,L]

回答1:


Google will be just like every other user and only see the URLs you provide. So they will not be aware that directory exists.




回答2:


You don't need to use a .htaccess file to have the site show in a different location, simply move the contents of that directory to the root, clear the cache, and re-run the search index job.

You don't have to make any database changes as urls in content are parsed then cached.

Mike



来源:https://stackoverflow.com/questions/11375384/the-google-seo-considerations-over-using-htaccess-rule-to-ignore-top-level-dire

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!