-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider deploying at subdirectory instead of subdomain #49
Comments
This can be achieved by using a Netlify rewrite in the main site (OpenZeppelin/openzeppelin.com), but I'm not sure if we can do a rewrite + a 301 redirect without causing a loop. Netlify may be smart enough to break the loop, but we have to try and see what happens. |
Not sure I see where we would be generating the loop. The rewrite+redirect should happen only on docs.oz.com, and never if the domain is plainly oz.com. |
I'm not sure if we're talking about the same things. Can you explain the configuration that you have in mind to implement this? By "rewrite" I meant Netlify's feature of configuring a redirect with status 200. Thus, we would have a line like this in the redirects configuration for openzeppelin.com:
A loop may be generated if the redirects for the docs site then look like this:
|
Thanks, now I see your point. If we test this and indeed generates a loop, we should be able to go around it by setting up a new domain that actually serves the docs, let's say docs-for-real.oz.com (as a placeholder...). So the rules would look like:
|
We can also use the |
Keeping the docs at a subdirectory (ie openzeppelin.com/docs) is better for SEO than using a subdomain (ie docs.openzeppelin.com) (read here).
However, to avoid losing the current positioning, we need to ensure every existing page is properly 301'ed to the corresponding subdomain.
The text was updated successfully, but these errors were encountered: