Support » Fixing WordPress » Permalinks without index.php

  • Resolved csilveira

    (@csilveira)


    I’ve searched, and searched for this fix but didn’t find it. I did end up figuring it out, and wanted to give a helping hand to others who are experiencing this problem.

    ***I host my own blog using Apache 2.2.14 with PHP 5.2.12 and MySQL 5.1.39 and WordPress v.2.9.1 This is assuming you have the same setup***

    **********************************************************************
    What the problem was: My URL was showing http://www.example.com/index.php/post
    What I wanted: My URL to show http://www.example.com/post/
    What I did to fix it:

    • 1. Open apache conf file (httpd.conf) and do a search for:
      Options Indexs FollowSymlinks put a + (plus sign) in front of FollowSymlinks it should look like this +FollowSymlinks
    • 2. Next check if mod_rewrite is loaded do a search for it and uncomment it by removing the # if its there.
    • 3. Next do a search for this block of code:
      <Directory />
       AllowOverride None
       Order deny,allow
       Deny from all
      </Directory>

      Change AllowOverride None to AllowOverride All it should look like this:

      <Directory />
       AllowOverride All
       Order deny,allow
       Deny from all
      </Directory>

    • 4. After making the changes save the file, and restart the Apache service
    • 5. Next login in to your WordPress dashboard and go to:
      Settings > Permalinks > select Custom Structure and put /%postname%/ (if this is the format you want) click Save Settings, visit your blog and test it out. You should now have “Pretty Permalinks”
Viewing 3 replies - 1 through 3 (of 3 total)
  • I have no clue why, but this didn’t work for me. I contacted my host and asked them to change the Apache file as you described. (I even linked them to this page for the instructions.) They wrote me back and said they had completed steps 1-4 and now I just had to do 5 on my own by logging into WP.

    I did what you said but only got what I’ve gotten before – 404 errors. I am using WP 2.9.2, however. Does anyone know if this could change things? If so, do you know what I can do to fix it and finally rid myself of that “index.php” in my URL?

    Try creating a .htaccess file. in that file put this:

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

    Save the file .htaccess (make sure the “Save as type:” is set to All file(s)) upload it to your WordPress directory. See if that works.

    That actually worked. Thank you so, so much!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permalinks without index.php’ is closed to new replies.