• Resolved stephane-le-chat

    (@stephane-le-chat)


    Hi,

    Please, excuse me if I’m not even clear, it’s not easy for me to describe my problem in english 🙂

    Some informations:
    – Version de WordPress : 2.8.5
    – Thème utilisé : Self developped
    – Extensions en place : Dean’s Permalinks Migration
    – Nom de l’hebergeur : local via EasyPHP
    – Adresse du site : none

    When the permalink structure is set to the default one, (http://127.0.0.1/wordpress/?p=123), I can see all posts when I click on their permalink.

    In a first time, I’ve activated Dean’s Permalinks Migration and I’ve followed the procedure to applicate this structure: /%postname%/.

    Since that, I’ve the following problem:
    – When I put the mouse over a permalink, I can read an adresse like: http://127.0.0.1/my_website/post_name/, but when I click on it, I get a 404 error:

    “Objet non trouvé!
    L’URL requise n’a pu etre trouvée sur ce serveur. La référence sur la page citée semble être erronée ou perimée. Nous vous prions d’informer l’auteur de cette page de cette erreur.

    Si vous pensez qu’il s’agit d’une erreur du serveur, veuillez contacter le gestionnaire du site.

    Error 404
    127.0.0.1
    11/01/09 12:40:32
    Apache/2.2.13 (Win32) PHP/5.3.0″

    In a second time, I’ve desactivated Dean’s Permalinks Migration because someone on a french forum told me that it was not necessary to use a plugin to modify permalink structure.

    But it doesn’t work too.

    Other informations:

    In file httpd.com, I’ve deleted the # which was in front of “LoadModule rewrite_module modules/mod_rewrite.so” to activate the rewrite_module.

    Here is the .htaccess file:

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

    # END WordPress

    Is this problem very difficult to solve, but on french forum, nobody can help me (I’ve asked help on last sunday, and today the problem is not solved)

    Could you please help me? 😉

    Stéphane

Viewing 12 replies - 1 through 12 (of 12 total)
  • delete the .htaccess file
    go to
    admin – Settings – General
    set both url’s to
    http://localhost/wordpress
    save
    now go to
    admin – Settings – Permalinks
    and input your custom structure
    save
    should work

    Thread Starter stephane-le-chat

    (@stephane-le-chat)

    Hi samboll

    Thanks for your help.

    Unfortunately, it doesn’t work.

    Can you tell me which is the right .htaccess file:

    This (self generated):

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

    # END WordPress

    or this one (whithout /wordpress/ at line :RewriteRule . /wordpress/index.php [L])

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

    # END WordPress

    the top would be correct

    Thread Starter stephane-le-chat

    (@stephane-le-chat)

    Thanks Samboll.

    Could you tell me if the following behaviour is correct or not:

    In the httpdconf file (at C:\Program Files\EasyPHP5.3.0\apache\conf), I’ve added a # at line LoadModule rewrite_module modules/mod_rewrite.so (so now, it’s ##LoadModule rewrite_module modules/mod_rewrite.so and now the module is not activated, right?).

    I’ve stopped and started the server.

    Nothing has changed: When I put the mouse over a permalink, I can read an adresse like: http://localhost/wordpress/post_name/, and if I click on it, I get a 404 error.

    My question is: is it correct to read pretty permalinks even if rewrite_module is not activated?

    Is there a table where links between ugly adress and pretty adress are written?
    Is it there, the original cause of my problem? What can I do?

    Thnks for your help.

    Stéphane

    a # at line LoadModule rewrite_module modules/mod_rewrite.so (so now, it’s ##LoadModule rewrite_module modules/mod_rewrite.so and now the module is not activated, right?).

    that should deactivate it
    not sure why it won’t work with that removed

    review this page just to see if you missed anything
    http://www.tamba2.org.uk/wordpress/xampp/

    Thread Starter stephane-le-chat

    (@stephane-le-chat)

    Hi,

    I did it again:
    With “#LoadModule rewrite_module modules/mod_rewrite.so”, pretty url are well written.

    Nothing new with http://www.tamba2.org.uk/wordpress/xampp/. I’s nor said if LoadModule rewrite_module modules/mod_rewrite.so is necessary to abtain pretty url or to avoid 404 error. See’m to be the second one…

    So, my problem is nor solved…

    Any other idea?

    Tried with follow symlinks?

    Options +FollowSymlinks

    I have to use it on both local and live site..

    Goes above the rest of the stuff in the htaccess…

    Thread Starter stephane-le-chat

    (@stephane-le-chat)

    Hi t31os_

    Thanks for your help.

    I’ve pasted Options +FollowSymLinks at the very top of the htaccess file:

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

    But the problem is the same…. 🙁

    If there are any htaccess files in the directories above the WordPress one (in a parent folder), the settings there will take precedence over those in child htaccess file.

    Check your parent folders for htaccess files.

    #LoadModule rewrite_module modules/mod_rewrite.so

    should also read..

    LoadModule rewrite_module modules/mod_rewrite.so

    .. the # comments out the code, which in turns disables that feature, so you most certainly want that un-commented..

    Thread Starter stephane-le-chat

    (@stephane-le-chat)

    Hi t31os_

    Thanks again for your help 🙂

    Are you sure that it’s about htaccess?
    httpd.conf, no?

    I’ve found 2 httpd.conf files:
    one at: C:\Program Files\EasyPHP5.3.0\apache\conf
    and one at: C:\Program Files\EasyPHP5.3.0\conf_files

    In the first file, the line [quote]LoadModule rewrite_module modules/mod_rewrite.so[/quote] was activated (no #)

    But not in the second. So I’ve removed the # sign in front of the line and… it doesn’t work…

    I’ve stopped and started the server, but it doesn’t work.

    Do I have to re-instal php and worpress?

    Or what else?

    Thread Starter stephane-le-chat

    (@stephane-le-chat)

    Hi all,

    I’ve found the solution!

    With the help on a french forum which told me about AddModule mod_rewrite.c, I’ve found this page:

    http://forum.webrankinfo.com/probleme-url-rewriting-avec-apache2-sous-winxp-t16193.html

    It was said thaht it was necessary to change “AllowOverride None” by “AllowOverride All”.

    That’s was I’ve done, for all AllowOverride None lines that I’ve found in the httpd.conf file.

    And now, it works!!! (And without AddModule mod_rewrite.c)

    I can said that the “master” httpd.conf file is that which is at C:\Program Files\EasyPHP5.3.0\conf_files.

    This is the one to be modified.

    My problem is solved now 🙂

    Thanks to you, all.

    Stéphane, I didn’t have to change all the AllowOverride None to AllowOverride All in httpd.conf. You just need to change one for Directory "${path}/www and it works:

    # DocumentRootDirectory
    <Directory "${path}/www">
        #
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        #
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        #
        # The Options directive is both complicated and important.  Please see
        # http://httpd.apache.org/docs/2.2/mod/core.html#options
        # for more information.
        #
        Options Indexes FollowSymLinks
    
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride All
    
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    
    </Directory>

    I restarted Apache and it worked right away.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘404 Error when using pretty permalink, in local mode.’ is closed to new replies.