Your problem should be resolved when you enable “clean URLs” on your Drupal website.
Please check for links above in this forum for the details. The links contain detailed explanations.
Here is the way to access “Clean URLs”:
Configuration > Search and metadata > Clean URLs OR yourwebsite.com/admin/config/search/clean-urls
That will do it.