Set $WORDCHARS accordingly. In your case, remove / from $WORDCHARS.
https://unix.stackexchange.com/a/726014
For the bash people
stty werase undef bind '"\C-w": backward-kill-word'
For the bash people
source: https://superuser.com/questions/212446/binding-backward-kill...