WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] .htaccess problem in 2.0 (20 posts)

  1. semperfidelis
    Member
    Posted 8 years ago #

    Hi there!

    I just upgrade to WordPress 2.0 but the new version don´t want to write de ".htaccess" file.

    This is my .htaccess in 2.0:

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

    # END WordPress

    After upgrade, i update the Permalinks (Opciones->Permalinks) just like says in the Codex (http://codex.wordpress.org/Upgrading_WordPress) but it dosen´t work.

    I have a copy of my old ".htaccess" (1.5.2 version). But ¡i don´t know what is the problem!

    What can i do for fix it?
    Can i just use the old .htaccess file?
    How can i do a new one in the 2.0 version?

    Help me please.
    Thanks.

    Ezequiel Apesteguia
    http://www.pdsxxi.com.ar

  2. SoundTrip
    Member
    Posted 8 years ago #

    There is a problem in 2.0 if you change the permalinks struture. It generates the file you have listed above. I enabled permalinks and all of a sudden my podcasts broke because the rewrite rule broke access to my mp3's, even if you tried to navigae to them directly.

    The fix for me was to return permalinks to the default and delete the .htaccess file as listed above (rename it to be safe). It could be that this only broke old posts when permalinks were different but I am not sure. Links to my .mp3 files would actually return posts as opposed to the file, ouch!

    I haven't had a chance to dig into this yet but that is the quick fix for me; not sure about the 1.5 .htaccess file.

    - Trip

  3. Austin Matzko
    Member
    Posted 8 years ago #

    semperfidelis, the .htaccess file you show above is exactly how WP 2.0's .htaccess file should look, because it now handles rewrite rules internally.

  4. semperfidelis
    Member
    Posted 8 years ago #

    Hi Trip!

    ok, you fix the problem by "return permalinks to the default"
    But i don´t want to have permalinks like:

    http://www.pdsxxi.com.ar/?p=123

    I want to have the structure:
    /archivos/%day%/%monthnum%/%year%/%post_id%/

    In 1.5.2 i have this structure and my .htaccess file works fine.

    If i replace the .htaccess for the old one (1.5.2) and update the permalinks in 2.0 to:
    /archivos/%day%/%monthnum%/%year%/%post_id%/

    Can it work fine?

  5. vkaryl
    Member
    Posted 8 years ago #

    No.... the .htaccess rules in 2.0 will always appear as you have them listed in your first post; wp handles that internally now.

    There have been a lot of problems with .htaccess. If you do a site search using google, you will find various threads, and perhaps some solutions.

  6. semperfidelis
    Member
    Posted 8 years ago #

    Hi Filosofo.

    So ... ¿my .htaccess file is fine? No need to change it?

  7. Truth
    Member
    Posted 8 years ago #

  8. semperfidelis
    Member
    Posted 8 years ago #

    vkaryl, thanks. I will try to find the threads.

  9. vkaryl
    Member
    Posted 8 years ago #

    Well, let us know how it goes, okay?

  10. jjacobsen
    Member
    Posted 8 years ago #

    The only structure I've found to work is to have it include index.php, such as

    /index.php/archivos/%day%/%monthnum%/%year%/%post_id%/

    I don't think the problem is in htaccess. I believe it is a bug in classes.php

    See http://wordpress.org/support/topic/56423

  11. semperfidelis
    Member
    Posted 8 years ago #

    ok, when a fix the problem i let you know. :) thanks

  12. Austin Matzko
    Member
    Posted 8 years ago #

    semperfidelis, could you explain what the problem is that you're having? The permalinks should work just the same as they did with 1.5.x, except that you won't see all the rewrite rules in the .htaccess file.

    If you're getting an error with the permalinks, or you have plugins that have custom rewrite rules, then that may be a different story.

  13. semperfidelis
    Member
    Posted 8 years ago #

    i´m back:

    I didn´t have any problems with my blog, Errors 404 for example, like in the others posts. I´m just worry about the .htaccess file. In wp 1.5.2 the file was "longer".

    I can´t find "A" solution, but ...

    I tried http://wordpress.org/support/topic/54340?replies=27
    (replace the functions-post and classes files and update the permalinks)

    and http://wordpress.org/support/topic/56423.
    (tried with /index.php/ on the structure of permalinks)

    In both cases the permalinks works fine. Anyway, i just have the same .htaccess file:


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

    # END WordPress

    My blog works fine, but ¿is the .htaccess fine?
    ¿wp 2.0 handles .htaccess rules internally now?

  14. vkaryl
    Member
    Posted 8 years ago #

    That's how the .htaccess will always look now. It's designed to look and work that way. It's fine - that's now the programmed default.

  15. semperfidelis
    Member
    Posted 8 years ago #

    filosofo:

    I´m not getting an error with the permalinks. I want to install wp2pdf plugin:
    http://wp2pdf.sourceforge.net/

  16. semperfidelis
    Member
    Posted 8 years ago #

    vkaryl

    OK! THANKS! you answer my question! jeje :P

  17. semperfidelis
    Member
    Posted 8 years ago #

    vkaryl:

    the last one: can i add new rules to the .htaccess anyway?

    To install wp2pdf plugin (http://wp2pdf.sourceforge.net/) for example.

  18. vkaryl
    Member
    Posted 8 years ago #

    You can - but wp won't save them. The only stuff that's ever going to appear between # BEGIN WordPress and # END WordPress is exactly what you see there.

    I don't know what to tell you about the .htaccess rules for the plugin you want to use.

  19. semperfidelis
    Member
    Posted 8 years ago #

    Ok thanks for everything!

  20. vkaryl
    Member
    Posted 8 years ago #

    You're welcome, have fun, and let us know if there's something else we can help you with.

Topic Closed

This topic has been closed to new replies.

About this Topic