-
Notifications
You must be signed in to change notification settings - Fork 114
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
Handle Github pages 404 issue #2179
Conversation
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
@astrojuanlu In slow motion you show that text "// in 404.html // in 404.html" was just for testing, I forgot to deploy the latest one , but now its updated. now it shows "Redirecting..." |
I fixed it now, if any sub path other than experiment-tracking is hit directly like this https://jitu5.github.io/experiment-trackingadsd, now it will be redirect to home/landing page. |
This approach is specifically added for Github pages, on hitting faulty URLs it redirect you to our custom 404.html but locally thing works same as before. |
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
# Conflicts: # RELEASE.md
# Conflicts: # RELEASE.md
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look's great now! thanks @jitu5 .. this was a tough one to fix, and u did it in a minimal way!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try using the exact same contents of the index.html
file for the 404.html
?
I just had to solve this issue for AlloyViz, which is also deployed to GH pages.
This is how I did it:
"build": "tsc && vite build && cp ./dist/index.html ./dist/404.html",
Might not be the same. Wanted to share my findings in case they were helpful!
@tynandebold Thanks for sharing your finding. This is even clear solution, I got once the control goes to client-router(React-router) it handle as normal button click or |
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazing, all looking good for me 👍 thank you @jitu5
Signed-off-by: tynandebold <thdebold@gmail.com>
* Remove exp tracking from feature hits and global toolbar; remove ExperimentsIcon Signed-off-by: tynandebold <thdebold@gmail.com> * Remove /experiment-tracking directory; fix tests Signed-off-by: tynandebold <thdebold@gmail.com> * Remove exp. tracking utils, reducers, styles Signed-off-by: tynandebold <thdebold@gmail.com> * Update moto requirement from ~=5.0.9 to ~=5.0.21 in /package (#2218) Updates the requirements on [moto](https://github.com/getmoto/moto) to permit the latest version. - [Release notes](https://github.com/getmoto/moto/releases) - [Changelog](https://github.com/getmoto/moto/blob/master/CHANGELOG.md) - [Commits](getmoto/moto@5.0.9...5.0.21) --- updated-dependencies: - dependency-name: moto dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update httpx requirement from ~=0.27.0 to ~=0.28.0 in /package (#2216) Updates the requirements on [httpx](https://github.com/encode/httpx) to permit the latest version. - [Release notes](https://github.com/encode/httpx/releases) - [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md) - [Commits](encode/httpx@0.27.0...0.28.0) --- updated-dependencies: - dependency-name: httpx dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update bandit requirement from ~=1.7 to ~=1.8 in /package (#2215) Updates the requirements on [bandit](https://github.com/PyCQA/bandit) to permit the latest version. - [Release notes](https://github.com/PyCQA/bandit/releases) - [Commits](PyCQA/bandit@1.7.0...1.8.0) --- updated-dependencies: - dependency-name: bandit dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update boto3 requirement from ~=1.34 to ~=1.35 in /package (#2214) Updates the requirements on [boto3](https://github.com/boto/boto3) to permit the latest version. - [Release notes](https://github.com/boto/boto3/releases) - [Commits](boto/boto3@1.34.0...1.35.71) --- updated-dependencies: - dependency-name: boto3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jitendra Gundaniya <38945204+jitu5@users.noreply.github.com> * Revert change from PR #2179 Signed-off-by: tynandebold <thdebold@gmail.com> * Remove the sanitizedPathname() function Signed-off-by: tynandebold <thdebold@gmail.com> * Remove Cypress tests for exp tracking Signed-off-by: tynandebold <thdebold@gmail.com> * Merge localStorageState state instead of the older allLocalStorageState Signed-off-by: tynandebold <thdebold@gmail.com> --------- Signed-off-by: tynandebold <thdebold@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jitendra Gundaniya <38945204+jitu5@users.noreply.github.com>
Description
Resolves #2048
This pull request includes changes to fix a 404 error on the experiment tracking page, and to ensure the 404 page is correctly redirect to root and manage by React router internally by keeping the content of the index.html and 404.html same.
Development notes
Redirect handling:
package.json
: Modified the build script to copyindex.html
to404.html
to ensure the 404 page is correctly served.QA notes
I have deployed the changes to Github pages https://jitu5.github.io to test.
Checklist
RELEASE.md
file