the Google SEO considerations over using .htaccess

2019-07-27 01:57发布

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]

2条回答
Viruses.
2楼-- · 2019-07-27 02:29

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

查看更多
淡お忘
3楼-- · 2019-07-27 02:33

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

查看更多
登录 后发表回答