removed index.php now all pages 404

I added this code to my .htaccess file to get rid of index.php, but now all the pages 404 (the hyperlinks are mapped to the correct url)

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

i set up my permalinks using http://1.1.1.1/%postname%/

what are the next steps in order to troubleshoot this issue?

what is the default permalink for me to revert it back to when it had index.php in the url?

Topic permalinks htaccess 404-error Wordpress

Category Web


If you want to remove the index.php from your URL structure, then using this rewrite rule (assuming you're using Apache, from your question) in your .htaccess will help.

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Then, flush permalinks by either using WP-CLI and running wp rewrite flush, or visiting the Permalinks settings page and clicking the save button. You don't need to make any changes before saving, but if you want to be sure to use just the post slug, click that radio option first, then save to flush permalinks.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.