2

I am trying to fix a problem, the links are all messed up and look like

enter image description here

I have tried this code in the public_html folder in a .htaccess file, the links are now working with index.php/%postname%/ but I need to get rid of the index.php

# 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

Any Help would be amazing. Thanks

3
  • to solve that you need to install and load mod_rewrite on your server
    – mmm
    Commented Oct 2, 2016 at 7:23
  • Can you explain a little more? Commented Oct 2, 2016 at 7:24
  • Please see this link , I think it will help you.
    – saikatwp
    Commented Oct 2, 2016 at 9:40

1 Answer 1

2

After hours of searching and reading, This is how I solved the Problem.

Step 1: Create a .htaccess file in the root folder and put this code there.

# BEGIN
<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 

Step 2: is Mentioned here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.