File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -380,3 +380,28 @@ In this section, we will guide you through the steps for creating a new FAQ.
380
380
4 . ** Save and Preview:**
381
381
* Save the file, then run ` jekyll serve ` in your terminal to start the local server. Visit ` http://localhost:4000 ` to preview your FAQ.
382
382
383
+ ### How to give redirects?
384
+ In this section, we will guide you through the steps for giving a redirect.
385
+
386
+ 1 . ** Navigate to the html page from which you want to redirect:**
387
+ * In the site main directory, open the html page from which you want user to redirect.
388
+
389
+ 3 . ** Javascript based redirect:**
390
+ * In the html file use the script:
391
+ ```
392
+ <script>
393
+ window.location.href = "/urlSlug";
394
+ </script>
395
+ ```
396
+ * This part uses Javascript to immediately set the ` window.location.href ` to ` /urlSlug ` , redirecting the user.
397
+
398
+ 3 . ** Non-Javascript fallback:**
399
+ * In the html file if the Javascript is disabled for the browser use:
400
+ ```
401
+ <noscript>
402
+ <meta http-equiv="refresh" content="0; url=/urlSlug">
403
+ </noscript>
404
+ ```
405
+ * The ` <noscript> ` block activates, and the ` <meta> ` tag trigger a refresh to ` /urlSlug ` with a delay of 0 second.
406
+
407
+ This approach ensures seamless redirection regardless of whether Javascript is enabled or not.
You can’t perform that action at this time.
0 commit comments