Permalink does not work on unit lessons

I installed Coursepress pro, and I am really happy with it but I encounter a major issue.
I have permalink like this subdomain.domain.tld/index.php/%postname% .If I want to acces courses I go like subdomain.domain.tld/index.php/courses (the default plugin added menu does not work ) and the other link works well exept when I go to a course units page and click on a unit.
From there on I get only to a 404 page because it does not keep the index.php in the permalink and I have to add it manually.So the link is subdomain.domain.tld/courses/course-name/units/unit-name and it should be subdomain.domain.tld/index.php/courses/course-name/units/unit-name
I tried adding index.php before the courses in the coursepress setting like this subdomain.domain.tld/index.php/courses/ but this will not work as it will add the index.php text twice.
If I remove the index.php from the permalink the links won't work either.
Is there any way in wich I can add it automatically index.php to units permalinks, so it will be subdomain.domain.tld/courses/course-name/units/unit-name?
Thank you for your help !

  • Sajid
    • DEV MAN’s Sidekick

    Hi @constantinradupetrisor,
    Hope you are doing good today :slight_smile:

    CousePress plugin needs postname permalinks like below instead on index.php/postname.


    Please go to Settings > Permalinks and select Post name as seen in attached screenshot and then check again.

    Hope that helps! But please don't hesitate to post a reply if you need further assistance, happy to help :slight_smile:

    Also, it would be great if you grant support staff access so I can take a closer look. You can grant access from WPMU DEV > Support > Support Access > Grant Access or see this manual.

    Take care and have a nice day :slight_smile:
    Cheers, Sajid

  • Constantin Radu Petrisor
    • WPMU DEV Initiate

    Hi, thank you very much for your reply.
    I don't know why but in my wp installation all permalinks have index.php so I tried again with a custom structure. It didn't work so I checked my .htaccess file and added the following

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    and with this it works. I will mark this post as resolved
    Have a great day !

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.