I'm trying to create a liquid if statement to only run if product page == ?
{% if template contains 'products' and page.url == '/products/sky-dweller' %}
<script>window.location.href = '/';</script>
{% endif %}
Based on the documentation here you can check if the template name is product.
{% if template.name == 'product' %}
This will only appear on product pages.
{% endif %}
page
variable - that's only for the pages created at [your-store]/admin/pages. Instead, you could try checkingif product.handle == 'sky-dweller'
– Dave B