Browser Level Redirect Scripts for non broken or active pages.

You can create browser based redirects in your theme code instead of using the native redirect creator in the Admin. This will also allow you to bypass redirects for restricted paths like **shop** and will allow you to redirect from pages that are not broken or hidden. 

Add the following code just below the <head> in your theme.liquid code file.

`{% if request.path == '/shop' %}
<meta http-equiv="refresh" content="0;URL='/newfolder/path'" />
{% endif %}`

Example: 
Redirect from a page that lands at a path with /shop to /collections/newcollection

Replace shop with whatever the ending folder is in the redirect from path.  

replace /collections/newcollection with the path that you want to redirect to. This should be the path after your domain.com


OR 

  1. Edit the index.liquid

Add the following code just below the {{ content for index }} tag in the index.liquid file

`<script type="text/javascript">
if (window.location == "https://markstestingstore.myshopify.com/shop") {
window.location.href = 'https://markstestingstore.com/collections/newcollection';
}
</script>`


Replace the https://markstestingstore.myshopify.com/shop with the exact path you're redirecting from 

replace https://markstestingstore/collections/newcollection with the path that you want to redirect to. This should be the entire path you're redirecting to including domain.com and sub folders. 


OR

Edit the Theme.liquid file. 

Add the following code just below the <head>  tag in the theme.liquid file.



`{% if template == 'index' %}`
`<script>`
`window.location.href = "https://markstestingstore.com/newpath";`
`</script>`
`{% endif %}`


replace https://markstestingstore.com/newpath with the path that you want to redirect to. This should be the entire path you're redirecting to including domain.com and sub folders.