I have run into a problem with my WordPress blog. Previously, I could access pages using URLs like https://mywebsite.com/index.php/all. However, something unexplainable happened such that this URL has been renamed to https://mywebsite.com/?page_id=102. I have tried to change the permalink structure under settings and the link breaks. When the link appears as https://mywebsite.com/all it does not load in the browser. When I manually write it in the browser URL bar as https://mywebsite.com/index.php/all it automatically redirects to https://mywebsite.com/all. It seems as though I can no longer use the index.php name that was previously contained in the original URL pattern hence cannot access the links using human friendly names. How can I possibly fix the problem?
2
Answers
Looks like your .htaccess file was overwritten. Simplest solution is to change the permalink setting back to page_id and then again to Post name it should overwrite .htaccess file, if not try to put that into your .htaccess:
If its just about accessing all pages with adding index.php in url then simply you can use custom permalink structure to allow WP to do this.
You mension that its showing page_id in place of name so in permalink you can use %postname for his. take a look on screenshot.
after doing this change your url will work same as you asked.
Click to view screenshot of Custom permalink