Custom route ignore few url from discourse

If you’re trying to get drupal URLs to 301 to the proper Discourse topic then you want to use permalink redirects and probably permalink normalizations.

If you used an import script, it should have created permalinks, which you can see at /admin/customize/permalinks. If they aren’t working then you can use a permalink normalization to fix them up.