Wordpress Page or Url Redirection not working in cyberpanel

I was using serverpilot, few days ago i have migrated to cyberpanel. My website is not working properly on it.
anyone please tell me why page redirection is not working in .htaccess ?
redirect 301 mydo-main-name.com/my-old-file-location.pdf mydo-main-name.com/my-new-file-location.pdf

Welcome @MMR Happy you are here

Post your rewrite rules here as you see them on Website Manager