开发者

.htaccess - force a redirect

I'm working on a website (say, www.domain.com) and want to release part of the site (say, www.domai开发者_如何学JAVAn.com/foo/). How do I forcibly redirect users via .htaccess? Are there any SEO concerns about this? Would it be better if I just modified my application so that the part that is ready is accessible in the root domain?


This will redirect anything to the location of your choice. (.*) matches 0 or more of any char.

RewriteRule ^(.*)$ foo/ [flags]

SEO implications, I'm not certain of, but if you're only ready to release some parts of the site, then there's no issue there as the crawler will get the links you want it to. I'd advise sticking with the .htaccess solution instead of doing any modification as it leaves you free to add or change things more easily at a later stage.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜