sanjana2505006 opened a new pull request, #14:
URL: https://github.com/apache/grails-website/pull/14

   # Copy Old grails-cache Documentation to grails-website repo and then 
Redirect #1
   
   ### The Problem:
   The `grails-cache` documentation was hosted on a separate repository 
(`grails-cache`, `gh-pages` branch), which led to fragmentation. Users 
accessing legacy "snapshot" or "latest" URLs often faced broken links or 
outdated content disjointed from the main Grails website.
   
   ### What changes did I make:
   - **New Directory:** Cloned the entire `gh-pages` branch of `grails-cache` 
into a new directory: `docs-legacy-grails-cache` within the `grails-website` 
repository.
   - **Redirect Configuration:** Added an `.htaccess` file in 
`docs-legacy-grails-cache` to manage redirects.
   - **Fallback Mechanism:** Modified `index.html` files in 
`docs-legacy-grails-cache/snapshot` and `docs-legacy-grails-cache/latest` to 
include client-side meta-refresh redirects.
   
   ### How I fixed it:
   I centralized the documentation by migrating it into the main website repo. 
To ensure existing links remain functional and point to the new combined 
documentation, I implemented a robust dual-layer redirect strategy:
   1.  **Server-Side:** Used `RedirectMatch` in `.htaccess` to gracefully 
handle deep links (e.g. `.../snapshot/guide/foo.html`) by redirecting them to 
the main guide URL (`.../guide/cache.html`) without generating invalid combined 
paths.
   2.  **Client-Side:** Added meta-refresh tags to the `index.html` pages as a 
fallback mechanism. This mirrors the approach used in `docs-legacy-views` and 
ensures redirection works even in environments where `.htaccess` might be 
bypassed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to