-
Notifications
You must be signed in to change notification settings - Fork 392
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
React-Snap is generating every page as a directory which is adding a trailing slash. #386
Comments
To use this thing you will need additional configuration of the server:
the idea behind react-snap is so it would work out of the box ( Difference behind |
I guess I answered question so gonna close |
@stereobooster why would outputting html files require additional server config? static file servers all render files as is when found. It seems to me that using directories is what requires additional config? |
Take any standard server (nginx, apache, h2o). Put |
Oh you mean stripping the .html part of the URL. Fair that would have to be done |
most servers will default to index.html if not found, it will default to the error page. hence you can configure your server or even a s3 static server host that for each nested folder look for the index.html file. this would mean that it would insert a trailing / at the end of the route. so /about/ |
I am having the problem where if i go to any page generated by react-snap for example /contact-us will 301 redirect to /contact-us/ with a slash on the end so it's causing major seo issues... how can I make it so it doesn't 301 redirect and put a slash on the end and can just load /contact-us ? |
The question asked by @klinskyc is a vital problem for SEO purposes. The google SEO is not indexing the pages with redirect error. And adding a trailing slash "/" to the end of the url creates this redirect error. Since react-snap is created for SEO purposes, I think this problem of having 301 redirects should certainly be handled. |
To fix the slash thing, since I am using apache I did this
|
working fine thank you.. |
Feature Request
Is your feature request related to a problem? Please describe.
When running React-Snap, it is taking links like "/about", and putting the generated html into a folder called "about", which makes that link "/about/". This has SEO implications.
Describe the solution you'd like
generate the html as "about.html" instead of "/about/index.html"
Describe alternatives you've considered
I have not been able to find any alternatives, outtside of accepting the new link structure
Teachability, Documentation, Adoption, Migration Strategy
Ideally, react-snap's crawler would auto-detect the trailing slash based on the link it follows
The text was updated successfully, but these errors were encountered: