Home
Support Forums

Issue witth netlify.toml redirects

My redirects seemed to be working perfectly fine till about a week or 2 ago…

Most of them seem to be fine besides when I want aviparshan.com/israeldeals or aviparshan.com/israeldeals/ to redirect to aviparshan.com/israeldeals/index.html and not aviparshan.com/index.html

I never had pretify urls on, but I decided to test it today and the results didn’t change, I also modified the priority of the redirects to avoid having some other rule take precedence over these ones

[[redirects]]
    from = "/unitmeasure/*"
    to = "https://www.unitmeasure.xyz/:splat"
    status = 301
    force = true

[[redirects]]
    from = "/unitMeasure/*"
    to = "https://www.unitmeasure.xyz/:splat"
    status = 301
    force = true

[[redirects]]
    from = "/unitMeasure"
    to = "https://www.unitmeasure.xyz?utm_source=a1viparsh"
    status = 301
    force = true

[[redirects]]
    from = "/unitmeasure"
    to = "https://www.unitmeasure.xyz?utm_source=a1viparsh"
    status = 301
    force = false

[[redirects]]
    from = "/deal"
    to = "https://www.aviparshan.com/israeldeals/index.html?utm_medium=dea2l"
    status = 301
    force = true

[[redirects]]
    from = "/israeldeals"
    to = "https://www.aviparshan.com/israeldeals/index.html?utm_medium=isr2deals"
    status = 301
    force = false

[[redirects]]
    from = "/israeldeals/"
    to = "https://www.aviparshan.com/israeldeals/index.html?utm_source=isr2deals"
    status = 301
    force = true

[[redirects]]
    from = "/fb/*"
    to = "https://www.facebook.com/groups/588823001884824/:splat"
    status = 302
    force = true

[[redirects]]
    from = "/404"
    to = "https://www.aviparshan.com/404.html?utm_source=404"
    status = 404
    force = false

[[redirects]]
    from = "/linkedin"
    to = "https://www.linkedin.com/in/aviparshan/"
    status = 302
    force = false

[[redirects]]
    from = "/yt"
    to = "https://www.youtube.com/c/HearsieBlogspot1"
    status = 302 
    force = false  

[[redirects]]
    from = "/github"
    to = "https://github.com/avipars/"
    status = 302 
    force = false

[[redirects]]
    from = "/twitter"
    to = "https://twitter.com/aviinfinity"
    status = 302 
    force = false

[[redirects]]
    from = "/medium"
    to = "https://medium.com/@aviparshan"
    status = 302 
    force = false

[[redirects]]
    from = "/book"
    to = "https://emmaoss.blogspot.com/"
    status = 302 
    force = true

[[redirects]]
    from = "/apps"
    to = "https://play.google.com/store/apps/dev?id=7646777248290288031"
    status = 302 
    force = true

[[redirects]]
    from = "/resume"
    to = "https://www.aviparshan.com/resume.html?utm_source=r1esu"
    status = 302
    force = true

[[redirects]]
    from = "/index"
    to = "https://www.aviparshan.com/index.html?utm_source=i1nd"
    status = 302
    force = true

[[redirects]]
    from = "/"
    to = "https://www.aviparshan.com/index.html"
    status = 302
    force = true

[[redirects]]
    from = "/fb"
    to = "https://www.facebook.com/groups/shopisrael"
    status = 302 
    force = true

[[redirects]]
    from = "/israelamazon"
    to = "https://www.facebook.com/groups/shopisrael"
    status = 302 
    force = true

[[redirects]]
    from = "/israeldeals/telegram"
    to = "https://t.me/israelsbest"
    status = 302 
    force = true

[[redirects]]
    from = "/israeldeals/facebook"
    to = "https://www.facebook.com/groups/shopisrael"
    status = 302 
    force = true

[[redirects]]
    from = "/israeldeals/fb"
    to = "https://www.facebook.com/groups/shopisrael"
    status = 302 
    force = true

[[redirects]]
    from = "/israeldeals/page"
    to = "https://www.facebook.com/105515904241758/"
    status = 302 
    force = true

[[redirects]]
    from = "/israeldeals/message"
    to = "https://m.me/israeldealsonline"
    status = 302 
    force = true

[[redirects]]
    from = "/page"
    to = "https://www.facebook.com/105515904241758/"
    status = 302 
    force = true

[[redirects]]
    from = "/*"
    to = "https://aviparshan.com/404.html?utm_source=bn"
    status = 404
    force = true
    conditions = {Country = "ru,in,cn,ua,ke,pk,az,kr,kp,af,bd,my,ma,ir,vn,ng,ph,lv,eg,id,ci"}

[[redirects]]
    from = "/amazonsearch"
    to = "https://www.aviparshan.com/israeldeals/freeshipping.html?utm_source=a1mznsrch"
    status = 301
    force = true

[[redirects]]
    from = "/amazonsearch.html"
    to = "https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=a1mznsrhtml"
    status = 301
    force = true

[[redirects]]
    from = "/amazonsearcg"
    to = "https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=a1mznsrg"
    status = 301
    force = true
    
[[redirects]]
    from = "/freeship"
    to = "https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=f1reeship"
    status = 301
    force = true

[[redirects]]
    from = "/freeshipping"
    to = "https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=f1reeshippingnohtml"
    status = 301
    force = true
    
[[redirects]]
    from = "/freeshipping/"
    to = "https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=f1reeshippingslash"
    status = 301
    force = true

Hey @avipars,

I’m not sure what’s wrong here. When I visit Avi Parshan: Resume & Portfolio Site, I see a 404 page, but when I visit Best Deals in Israel Links, I see a valid page. So, it doesn’t seem like the latter is redirecting to the former.

Ah, for me it does

Should go to israeldeals/index.html

But it goes to /resume.html

That page too returns a 404 for me.

Ah, I think I set it to country codes

Try a vpn to the US… can I share the whole toml file with you?

Hi @avipars :wave: ,

I’m able to test from the US and it appears redirects are working now as you described. Did you make any changes?

This link redirects me to https://www.aviparshan.com/israeldeals/index.html?utm_source=dealstest when tested from Australia, Canada, Italy, and Japan.

Because I made a new page called aviparshan.com/israeldeals.html

Then I kept the redirect toml the same

So does that work for you or do you need to get it working with the previous setup?

If you need it with the previous setup, could you summarise what page needs to redirected where and share the complete netlify.toml?

Seems to be working after i made the html file - which in itselfis useless

The goal was to have aviparshan.com/israeldeals redirect to aviparshan.com/israeldeals/index.html

when i added minify assets - to shorten paths… it actually ruined some of my site functionality… so I had to revert.

Here’s my config file

(Attachment netlify.toml is missing)

Hi, @avipars. The config file doesn’t appear in your post. Would you please post it again?

Sure. I uploaded it separately and it got removed so let me copy and paste it

​[[​redirects​]]
​ ​from​ = ​"​/unitmeasure/*​"
​ ​to​ = ​"​https://www.unitmeasure.xyz/:splat​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/unitMeasure/*​"
​ ​to​ = ​"​https://www.unitmeasure.xyz/:splat​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/unitMeasure​"
​ ​to​ = ​"​https://www.unitmeasure.xyz?utm_source=a1viparsh​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/unitmeasure​"
​ ​to​ = ​"​https://www.unitmeasure.xyz?utm_source=a1viparsh​"
​ ​status​ = ​301
​ ​force​ = ​false

​[[​redirects​]]
​ ​from​ = ​"​/deal​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/index.html?utm_medium=dea2l​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/fb/*​"
​ ​to​ = ​"​https://www.facebook.com/groups/588823001884824/:splat​"
​ ​status​ = ​302
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/404​"
​ ​to​ = ​"​https://www.aviparshan.com/404.html?utm_source=404​"
​ ​status​ = ​404
​ ​force​ = ​false

​[[​redirects​]]
​ ​from​ = ​"​/linkedin​"
​ ​to​ = ​"​https://www.linkedin.com/in/aviparshan/​"
​ ​status​ = ​302
​ ​force​ = ​false

​[[​redirects​]]
​ ​from​ = ​"​/yt​"
​ ​to​ = ​"​https://www.youtube.com/c/HearsieBlogspot1​"
​ ​status​ = ​302​
​ ​force​ = ​false​

​[[​redirects​]]
​ ​from​ = ​"​/github​"
​ ​to​ = ​"​https://github.com/avipars/​"
​ ​status​ = ​302​
​ ​force​ = ​false

​[[​redirects​]]
​ ​from​ = ​"​/twitter​"
​ ​to​ = ​"​https://twitter.com/aviinfinity​"
​ ​status​ = ​302​
​ ​force​ = ​false

​[[​redirects​]]
​ ​from​ = ​"​/medium​"
​ ​to​ = ​"​https://medium.com/@aviparshan​"
​ ​status​ = ​302​
​ ​force​ = ​false

​[[​redirects​]]
​ ​from​ = ​"​/book​"
​ ​to​ = ​"​https://emmaoss.blogspot.com/​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/apps​"
​ ​to​ = ​"​https://play.google.com/store/apps/dev?id=7646777248290288031​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/index.html?utm_source=dealstest​"
​ ​status​ = ​302
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals/​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/index.html?utm_source=dealtest​"
​ ​status​ = ​302
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/index​"
​ ​to​ = ​"​https://www.aviparshan.com/index.html?utm_source=i1nd​"
​ ​status​ = ​302
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/​"
​ ​to​ = ​"​https://www.aviparshan.com/index.html​"
​ ​status​ = ​302
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/fb​"
​ ​to​ = ​"​https://www.facebook.com/groups/shopisrael​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israelamazon​"
​ ​to​ = ​"​https://www.facebook.com/groups/shopisrael​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals/telegram​"
​ ​to​ = ​"​https://t.me/israelsbest​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals/facebook​"
​ ​to​ = ​"​https://www.facebook.com/groups/shopisrael​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals/fb​"
​ ​to​ = ​"​https://www.facebook.com/groups/shopisrael​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals/page​"
​ ​to​ = ​"​https://www.facebook.com/105515904241758/​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals/message​"
​ ​to​ = ​"​https://m.me/israeldealsonline​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/page​"
​ ​to​ = ​"​https://www.facebook.com/105515904241758/​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/*​"
​ ​to​ = ​"​https://aviparshan.com/404.html?utm_source=bn​"
​ ​status​ = ​404
​ ​force​ = ​true
​ ​conditions​ = {​Country​ = ​"​ru,in,cn,ua,ke,pk,az,kr,kp,af,bd,my,ma,ir,vn,ng,ph,lv,eg,id,ci​"​}

​[[​redirects​]]
​ ​from​ = ​"​/amazonsearch​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/freeshipping.html?utm_source=a1mznsrch​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/amazonsearch.html​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=a1mznsrhtml​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/amazonsearcg​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=a1mznsrg​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/freeship​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=f1reeship​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/freeshipping​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=f1reeshippingnohtml​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/freeshipping/​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/freeshipping.html?utm_medium=f1reeshippingslash​"
​ ​status​ = ​301
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals/whatsapp​"
​ ​to​ = ​"​https://chat.whatsapp.com/EAgTuTadIcdEoPOO9zCcLv​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/wa​"
​ ​to​ = ​"​https://api.whatsapp.com/send?phone=+972584416631&text=Hey%20Avi​"
​ ​status​ = ​302​
​ ​force​ = ​true

​[[​redirects​]]
​ ​from​ = ​"​/jctindex​"
​ ​to​ = ​"​/jctindex.html​"
​ ​status​ = ​302​
​ ​force​ = ​true
​ ​conditions​ = {​Country​ = ​"​il,us​"​}

​[[​redirects​]]
​ ​from​ = ​"​/jcttel​"
​ ​to​ = ​"​https://t.me/joinchat/aonbzocTsvJjODY0​"
​ ​status​ = ​302​
​ ​force​ = ​true
​ ​conditions​ = {​Country​ = ​"​il,us​"​}

​[[​redirects​]]
​ ​from​ = ​"​/mathjct​"
​ ​to​ = ​"​https://us02web.zoom.us/j/5449021477​"
​ ​status​ = ​302​
​ ​force​ = ​true
​ ​conditions​ = {​Country​ = ​"​il,us​"​}

​[[​redirects​]]
​ ​from​ = ​"​/jctwa​"
​ ​to​ = ​"​https://chat.whatsapp.com/KyliUzatPVC2DnmKOG7bEs​"
​ ​status​ = ​302​
​ ​force​ = ​true
​ ​conditions​ = {​Country​ = ​"​il,us​"​}

Hi @avipars ,

The goal was to have aviparshan.com/israeldeals redirect to aviparshan.com/israeldeals/index.html

When we test aviparshan.com/israeldeals it redirects to https://www.aviparshan.com/israeldeals/index.html?utm_source=dealstest which is expected behavior based on your redirect rule:

​[[​redirects​]]
​ ​from​ = ​"​/israeldeals​"
​ ​to​ = ​"​https://www.aviparshan.com/israeldeals/index.html?utm_source=dealstest​"
​ ​status​ = ​302
​ ​force​ = ​true

Let us know if you had something else in mind?

It wasn’t working when I didnt have a israeldeals.html page… for now it does work, so i will not be deleting the otherwise pointless html file… thank you for the help… feel free to close the issue.