WordPress.org

Ready to get started?Download WordPress

Forums

PERMALINK Problem on WordPress 2.0 (39 posts)

  1. soohyunc
    Member
    Posted 8 years ago #

    Hi,

    I've installed WordPress 2.0 from the scratch on my server (http://www.cyon.org.uk/). It seems to be working everything fine except the permalinks.

    I've gone through lots of things based on this list, but unfortunately it did not work for me.

    Here is my situation.

    1. I'm using WordPress 2.0 with PHP5 and Apache2. (I know I have mod_rewrite module in my PHP installation.)

    2. I have the .htaccess file with 644 permission setting, and it reads as follows.

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

    # END WordPress

    3. I can make and get an access the permalinks something like "http://www.cyon.org.uk/index.php/archives/52".

    My question is that how do I remove 'index.php' in my permalinks? I tried to set the permalink at the 'Site Admin' page by typing "/archives/%post_id%" in custom field, but it never worked.

    It would be appreciated if someone could direct me to the right path.

    Thanks,

  2. Austin Matzko
    Member
    Posted 8 years ago #

    I tried to set the permalink at the 'Site Admin' page by typing "/archives/%post_id%" in custom field, but it never worked.

    What do you mean by "it never worked"? Do you mean that the setting refused to save, just reverting to the previous setting? Or do you mean that even with that as your permalink structure, the index.php still appears in the links?

  3. soohyunc
    Member
    Posted 8 years ago #

    It means that the web browser displays "The page cannot be found"

  4. Austin Matzko
    Member
    Posted 8 years ago #

    So you enter /archives/%post_id% into the permalinks field, click "Update," and then immediately you see "The page cannot be found"?

  5. soohyunc
    Member
    Posted 8 years ago #

    No. What I tried to say is that I typed "/archives/%post_id%" into the permalinks field, and it says the permalinks structure information is updated well.

    But, afterwards, if I try to access a page something like "http://www.cyon.org.uk/archvies/52", then the browser shows me "The page cannot be found".

  6. Austin Matzko
    Member
    Posted 8 years ago #

    Okay, do you know for certain that your server has mod_rewrite enabled? (I know you say "I know I have mod_rewrite module in my PHP installation").

  7. soohyunc
    Member
    Posted 8 years ago #

    Yes, I am certain as I can see 'mod_rewrite' in Loaded Module section of my PHP information page.

    I can use 'mod_rewrite' in another application. I use 'mod_rewrite' for the Gallery2 (http://gallery.sourceforge.net/) without any problem.

  8. Austin Matzko
    Member
    Posted 8 years ago #

    Hmm, the reason I asked is that it's behaving as though it's not using the .htaccess section you printed above. If that were working correctly, even an error page should redirect to index.php, not give the Apache message "The page cannot be found."

    So is there anything prior to the WordPress block, quoted above, in your .htaccess that could be interfering with it?

    What happens if the following is the only line appearing in the .htaccess?
    ErrorDocument 404 /index.php

  9. Football
    Member
    Posted 8 years ago #

    Using %post_id% in the permalink always seems to lead to a 4040.

  10. soohyunc
    Member
    Posted 8 years ago #

    I have manually edited .htaccess file such that it only has a line "ErrorDocument 404 /index.php" in it. After that, I set its ownership and group to "www-data" so that WP 2.0 can have an access the file.

    I typed "/archives/%post_id%" into the permalinks field, and then tried to access a link something like "http://www.cyon.org.uk/archives/52".

    But, it still failed! (The browser shows me up the same page like "The page cannot be found.")

    It's shame that the permalink in WP 2.0 is not smooth working for most people who use it.

    So, what else should I try? (By the way, the default paermalinks option always worked fine for me. But, I want something better permalinks.)

  11. Austin Matzko
    Member
    Posted 8 years ago #

    I have manually edited .htaccess file such that it only has a line "ErrorDocument 404 /index.php" in it. After that, I set its ownership and group to "www-data" so that WP 2.0 can have an access the file.

    If you gave it write permission, then WP probably added to the .htaccess file. I meant for you to try it with only the ErrorDocument line in it.

    At any rate, it sounds like this is a server issue, not a WP issue. With the ErrorDocument line, you shouldn't be getting any Apache error messages; the server should be sending all errors to the WP index.php page.

  12. soohyunc
    Member
    Posted 8 years ago #

    Hi, filosofo, Thanks for giving me your time and help.

    Okay, I also presume that this might be a server side issue. I wonder what sort of configuration should I add in my "apache.conf" for this get to work.

    I wonder if I add some "<Directory> ... </Directory>" options in the apache.conf file?

  13. Austin Matzko
    Member
    Posted 8 years ago #

    AllowOverride isn't set to "none", is it?

  14. soohyunc
    Member
    Posted 8 years ago #

    No. It's been set to "All".

    Here is my Apache configuration file, if you could give some realistic help. (http://www.cyon.org.uk/apache.conf.sample)

    Thanks,

  15. Austin Matzko
    Member
    Posted 8 years ago #

    I'm admittedly way over my head in trying to troubleshoot Apache setups, but shouldn't "RewriteEngine On" appear as a line between the <Directory /var/www> tags?

  16. soohyunc
    Member
    Posted 8 years ago #

    Okay, thanks for your help upto now.

    I will quit this issue as it didn't work for me after gone through almost every step which was posted in this troubleshoot page.

    Too much hardship on WP 2.0's permalink!

  17. creynolds
    Member
    Posted 8 years ago #

    Intresting that I am having the same problem, but I know that I have mod_rewrite apache mod working.

    It seems that it is a 2.0 problem, it only occured when I upgraded, when I was using 1.5 my .htaccess file was always 5 times as long, now I get the exact same .htaccess file output no matter what configuration I use. I am familiar with rewrite rules, the wordpress seems to not be generating the correct thing.

    I have reinstalled my wordpress twice to make sure that everything is working correctly and to try and regenerate the 'default' 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

  18. Austin Matzko
    Member
    Posted 8 years ago #

    now I get the exact same .htaccess file output no matter what configuration I use.

    For WP 2.0, the .htaccess should look just like you've printed above: no more. That's because WP 2.0 handles internally all those rewrite rules, which used to make 1.5's .htaccess so long.

  19. soohyunc
    Member
    Posted 8 years ago #

    This thread is still open to discuss, and it is not resolved yet.

  20. moshu
    Member
    Posted 8 years ago #

    Ryan posted some new patches/fixes - maybe you can try those:
    http://wordpress.org/support/topic/54340?replies=12#post-298609

  21. sonria
    Member
    Posted 8 years ago #

    I installed the patches, redid the .htaccess and now while my page-level permalinks work my post-level permalinks still do NOT work. This problem did not begin until I CHMOD'd my .htaccess to 777 in order to allow WP to write it. Now, even though I set it back to 644 before deleting and re-uploading, the problem is STILL THERE. I should note that it is NOT my WP-generated 404 that is showing.

    Example: http://cathcoll.net/contact works (this is a page). http://cathcoll.net/blog/2006/shout-out-for-suggestions/ (this is a post) does NOT work.

  22. Ryan Boren
    WordPress Dev
    Posted 8 years ago #

    That page looks like a WP generated 404 page. In that case the Debug Env plugin will be helpful.

    I notice that your page is in / while your post is /blog/. Typically both live in the same root. Debug Env will help me fix permalinks for your setup.

  23. sonria
    Member
    Posted 8 years ago #

    /blog is a virtual directory, the only thing on the site that's not in root is the photo gallery. (cf. http://codex.wordpress.org/Pages#Making_your_blog_appear_in_a_non-root_folder)

    I'll send the information to you in a few minutes.

  24. Rudeseal
    Member
    Posted 8 years ago #

    I get a similar problem, If I go to Options and select any setting for Permalinks other then the "Default", the .HTACCESS file is written with the info above and I am prevented from accessing anything from the website, either surfing in to view the site or accessing the admin control panel. I have to delete the .HTACCESS file, then select the default settings for permalinks in the options panel and then I have full access to wordpress..

  25. Ryan Boren
    WordPress Dev
    Posted 8 years ago #

    Rudeseal, does "prevented from accessing" mean you are getting 404s? Did permalinks work for you with 1.5.2? Can you give me Debug Env output?

  26. Rudeseal
    Member
    Posted 8 years ago #

    Ryan: I get 403 (Forbidden) errors consistantly on all pages and I can duplicate it. I will install the Debug Env Plug in and get back to you.. The page is located on the Netfirms server.. and yes, permalinks worked in the earlier version.

  27. Rudeseal
    Member
    Posted 8 years ago #

    Ryan, I am not getting any dumps for your Dump_ENV plugin, do I have to use a tag somewhere or does it automatically dump to my footer?

  28. mark12b
    Member
    Posted 8 years ago #

    I am having the same problem... permalinks give a 404 error regardless of the permalink stucture I set up. I have tried the updated files that ryan posted, as well as the .htaccess tips in this thread.

    If I use the default permalink stucture, I get the "404" section from within single.php (i.e. the Loop falls through to the error).

    If I use a custom permalink such as /%postname%/ I get the 404 page that's at the root of my theme.

    The big clue that I have is that if I log in to wp-admin, the 404 errors go away! Right now I am logged in in Firefox, and the pages display fine, but in Safari, with my cookies cleared, the 404 errors appear.

  29. pieceoplastic
    Member
    Posted 8 years ago #

    i am aware that i have a strange hosting situation.
    they won't let me use a .htaccess file.
    i can do some re-write rules via my hosting control center.

    but in WP 1.52 none of the permalink re-writes would work.
    so had to opt for the ole /index.php/%post_id%/%postname%/

    in my test WP 2.0 install i tested permalinks and saw that now the simplest re-write rule works fine even on my server, the one only using /%postname%/

    however after now upgrading to WP 2.0 i had to realise that my old structure, the one that always worked before, /index.php/%post_id%/%postname%/ is no longer working = 404 errors.
    can this somehow be a cache issue? because i did notice that at one point i managed to get name date based to work [= /%year%/%monthnum%/%day%/%postname%/, ]and now that one won't work any longer.

    ironically the one that does work [/%postname%/ is also a bit problematic as indicated in the instructions on codex.

    i also want to add that i have the /%post_id%/ in there that a few people have said is causing problems for them.

  30. greatbananas
    Member
    Posted 8 years ago #

    Your not the only person with this problem because I have the exact same issue!

    I upgraded my from 1.5.2 and had the problems so I had to revert back to the old one. The patch also did not work for me.

    I've been following the forums for a while now and there's been no solution. I hope the developers know this is a problem and will address it with a patch.

Topic Closed

This topic has been closed to new replies.

About this Topic