In the default permalinks, there is a /index.php/ in the middle. If I remove it in setting->permalinks->Custom Structure, all pages except the homepage will show the 404 error.
I have tried to open the website again in incognito mode, the same error exists.
Is there any more settings to be done besides the one in setting->permalinks->Custom Structure?
When you click Save Changes in Settings > Permalinks its should rebuild the structure.
If thats not working then its generally a httaccess issues on your server – speak with your host as they should be able to help with fixing that.