site 子目录充当根目录?我应该重定向 301 永久吗?
我遇到以下问题 - 我的网站位于我的托管帐户上 /www 文件夹下的一个文件夹,假设它是 /www/shop。然后,所有访问主域的访问者都会被 /www 文件夹中的 .htaccess 文件重定向到子文件夹。
我是否应该将此重定向 301 设置为永久,以便搜索引擎可以更好地索引我的网站? 这是我用于此目的的简单 .htaccess:
RewriteEngine On
RewriteRule ^$ /shop [L]
I have the following problem - my site is located one folder below the /www folder on my hosting account, let's say its /www/shop. All the visitors that come to the main domain are then redirected by .htaccess file in the /www folder which takes them to the subfolder.
Should I make this redirect 301 Permanent, so that search engines could index my site better?
Here's the simple .htaccess that I use for the purpose:
RewriteEngine On
RewriteRule ^$ /shop [L]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要它确实是永久的,就可以。
As long as it's really permanent, yes.