WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks withouth index.php won't work?? (11 posts)

  1. sepp88
    Member
    Posted 4 years ago #

    hi guys,
    i've done a few wordpress pages. mostly i use a custom permalink structure: /%postname%/

    it actually always worked so far but this time i have a lot of troubles. somehow only the default permalink structure: http://www.mypage.com/?p=123 is working without an additional index.php.

    if i choose MONTH AND NAME WordPress suggests by itself /index.php/%year%/%monthnum%/%postname%/ with the index.php in front.

    if i try to get rid of it, it always throws me a 404 error if i visit any of the subpages.

    any ideas. regards sepp

  2. Contact your hosting provider and confirm that mod_rewrite is enabled on your server.

  3. sepp88
    Member
    Posted 4 years ago #

    so i did, and mod_rewrite is turned on! see here http://cl.ly/1e5r

    any other ideas?

  4. I'm not familiar with that control panel. Are you sure that "Request Rewrite Support" enables mod_rewrite and not some custom hack?

  5. sepp88
    Member
    Posted 4 years ago #

    according to my hosting provider it means that mod_rewrite should be turned on.

  6. sepp88
    Member
    Posted 4 years ago #

    if i have a look on my webserver (with all hidden files to be visible) i can't even find an .htaccess file. shouldn't there be one in order to work for that? i copied the .htaccess file from one of my other wordpress installations onto the root of my server, however it still won't work. weird?

  7. Yes, you'll need a .htaccess file.

    Try re-saving your permalink structure at Settings/Permalinks in your admin panel. If WordPress cannot automatically create the .htaccess file, it will provide manual instructions after saving.

    You'll need to use a plain text editor to create a file named htaccess , add the code that WordPress provides after saving the permalink structure, upload the file to the blog directory with an FTP or SFTP client, and then rename it to .htaccess (add the dot).

  8. sepp88
    Member
    Posted 3 years ago #

    that's not the case. i have an htaccess file in there that says:

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

    however i installed the plugin AskApacheRewriteRules and it tells me that the rewrite_rules look like this:

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

    i just wonder why all permalink structures get suggested with a index.php in front of em. http://cl.ly/1fGY
    on other wordpress installations the permalink settings do not show the index.php part.

    maybe there's something wrong within my database?

  9. So, you see that your .htaccess file says one thing, but AskApacheRewriteRules says something different? Are you sure that you don't have two files? The second one would definitely be causing your problem.

    Find the .htaccess file in the same directory as WordPress' index.php file. What does it say?

  10. sepp88
    Member
    Posted 3 years ago #

    Is it even possible to have two .htaccess files on a server in the same directory? i can just find the one i gave up there. I now got rid of it but AskApache still says the same.

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

    that's weird. can't find any other .htaccess document up there.
    slowly it's starting to annoy me. btw thank you for your help!

  11. Well, whatever .htaccess file that AskApache is referring to needs to be:

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.