WordPress.org

Forums

Permalinks (31 posts)

  1. fluideye
    Member
    Posted 10 years ago #

    I am familiar with apache, .htaccess and have mod_rewrite installed on my server. My understanding is all that's needed to add permalinks is through the options>permalinks>create structure? Well whenever I do this and add the code to .htaccess my links show the new path when hovered over but upon clicking I am getting a 404 error. Is there another step and does it have anything to do with trackback?

  2. XeroCool
    Member
    Posted 10 years ago #

    With Trackback > No.

    Read this: http://codex.wordpress.org/Using_Permalinks

    Make sure .htaccess is chmodded 777.

  3. FYI: 666 will work

  4. XeroCool
    Member
    Posted 10 years ago #

    i recommend 777 but I guess 666 is good. Um, you got any white spaces in .htaccess?

  5. Ummm, Xero, I wouldn't do 777. Stick to 666. If you make it 777, anyone on your shared server (unless you're hosted on a dedicated server, you're on a shared server) will be able to write to your .htaccess file and read it (including all of your directory passwords). Do a Google search for .htaccess, you'll see that 644 is actually recommended, but 666 is required for it to writable by WP.

  6. fluideye
    Member
    Posted 10 years ago #

    No, I read and reread all of the codex info and the other postings to this forum but it still isn't clear to me unless I'm looking to deep. I modified .htaccess through my control panel so there is no need to chmod 666. Even so, the links when hovered show the new path but is directed to a 404.

  7. fluideye
    Member
    Posted 10 years ago #

    By the way if you are trying to repeat error on my site, I have cleared my .htaccess file.

  8. Why did you modify .htaccess through the control panel? WordPress should automatically modify .htaccess for you (that is if the file is CHMOD 666).

  9. fluideye
    Member
    Posted 10 years ago #

    Yes you can through word press or you can cut and paste into the .htaccess. I have done it both ways and get the same results.

    The structure I am trying for is:

    /%year%/%monthnum%/%day%/%postname%/

    What else needs to be done and will the structure work for every link on my site?

  10. What version of WordPress are you using?

  11. fluideye
    Member
    Posted 10 years ago #

    1.5

  12. FatherLuke
    Member
    Posted 10 years ago #

    Hope this helps in some small way:

    http://wordpress.org/support/topic.php?id=19497#post-125740

    Okay,
    Father Luke

  13. fluideye
    Member
    Posted 10 years ago #

    O.K. so I went into the wp-includes/vars.php file and made the changes suggested in the link above and word press still cannot write to .htaccess.

    Steps to enable permalink:

    1.structure: /%year%/%monthnum%/%day%/%postname%/

    2.Click on "Update Permalink Structure" tab

    3. Get following error message: "If your .htaccess was writable we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all."

    4 So I copy and paste rules into .htaccess file

    Now once I do this, whenever I hover over the post title, it shows the new link structure but whenever the link is clicked, I get a 404 page.

    Can someone tell me why?

  14. The .htaccess file may not be readable. Just try CHMOD 666. That'll make sure that it's readable and allow WP to write to it next time you set the permalink rules.

  15. fluideye
    Member
    Posted 10 years ago #

    I've done and still no luck. Thanks for everyone trying to help thus far. I'm still missing something here though.

  16. FatherLuke
    Member
    Posted 10 years ago #

    You know, I went to your site:

    http://www.blog.fluideye.com

    The permalinks seem to be working?

  17. rogermh
    Member
    Posted 10 years ago #

    Hi all,

    I am having what appears to be the same problem as fluideye. In my case, I am running WP off a home server (Mac OS X 10.3.8). I've got WP all set up and running and have even created my own theme, but am running into difficulty getting Permalinks to work. I've read through http://codex.wordpress.org/Using_Permalinks and came upon this thread in my forum search.

    mod_rewrite is correctly installed on Apache as indicated by my PHPInfo file. I am using the default WP permalink URL structure. I've set AllowOverride in my httpd.conf file to "All" from "None". My .htaccess file has been created and is modifiable by WP (I can see it and modify it from within WP). I've restarted Apache. Everything seems to be the way it's supposed to be. When I hover over the links, they are correct, but when I click on the links, I get a "Not Found" error.

    It sounds like the same problem as fluideye. Fluideye, your website appears to be down right now, but did you resolve this problem as the previous poster indicated? If so, please share the solution! :-)

    Roger

  18. Is your .htaccess file readable? Preferably CHMOD 666.

  19. rogermh
    Member
    Posted 10 years ago #

    My .htaccess file has chmod 664. I am the owner and www is the group so it should be fine. However, just for grins, I changed the chmod to 666 but it still doesn't work.

    Any other ideas?

    Roger

  20. rogermh
    Member
    Posted 10 years ago #

    I should add that I have a standard 1.5 install with no plugins.

  21. rogermh
    Member
    Posted 10 years ago #

    Yay! I fixed the problem. In Mac OS X (10.3.8), you have to set the AllowOverride variable to All in two places in the httpd.conf file. My problems stemmed from only having set this in one place.

    This is the first place as described in the WordPress codex (http://codex.wordpress.org/Using_Permalinks):


    <Directory />
    Options FollowSymLinks
    AllowOverride All
    </Directory>

    And this is the second place:


    # This controls which options the .htaccess files in directories can
    # override. Can also be "All", or any combination of "Options", "FileInfo",
    # "AuthConfig", and "Limit"
    #
    AllowOverride All

    Once I did that, everything seems to work. Hopefully this info will help other Mac users and perhaps users on other platforms whose http.conf files may be set up similarly.

  22. mrbenn
    Member
    Posted 9 years ago #

    I'm having the same problem with my permalinks as discussed above, ie. mod_rewrite is definitely there, CHMOD set to 666, set permalinks to anything but the standard and I can see the default page but the Previous page is missing(the link is wrong if I hover over Previous).

    My permalinks are set to /%year%%monthnum%%day%/%hour%%minute%%second%/

    See it not working here! http://www.29twelve.com/blog/

    My next step is to change httpd.conf, as it's with a hosting company surely I can't change this??

    Thanks in advance for any help.

    Ben

  23. You need a slash in between each query. Ex:

    /%year%/%monthnum%/%day%/%hour%/%minute%/%second%/

  24. mrbenn
    Member
    Posted 9 years ago #

    Thanks for such a quick response!!

    I did think that so tried /%postname%/ but it still doesn't work.

    Update: I've found it's defaulting to http://www.29twelve.com/blog/index.php/page/2/ as the link structure, surely I would need to set it to use /index.php/?? I've since deleted the .htaccess and re-done the permalinks to just /%postname%/ and that still doesn't work, it defaults to the index.php structure above!! Joy!

    Update 2!: I've got a blank .htaccess and set the permalinks to nothing and it's using http://www.29twelve.com/blog/index.php?paged=2, there's something fishy going on here but I can't for the life of me figure out what it is!

  25. FatherLuke
    Member
    Posted 9 years ago #

    There are a couple of things going on at first glance, not that this will help with your immediate problem, but you will have to do it eventually, so. . .

    Your Feeds links in the foother need to be looked at.

    feed:http://www.29twelve.com/blog/index.php/feed/

    Take out the initial

    "feed:"

    They will dead end on you.

    Okay for now,
    Father Luke

  26. nerdtech
    Member
    Posted 9 years ago #

    mrbenn:

    Haved you figured out a solution to this? I also am running a stock 1.5 installation, and tried to make my structure to be this:

    /%year%/%monthnum%/%day%/%postname%/

    I wipe out the existing .htaccess, touch a new one, chmod it to 666 - and I get 404s when I try to go to any single post page, or try to look at/make comments.

    As soon as I move the permalink structure code back to nothing - it works again, but no pretty-pretty permalinks like I desire.

    Ideas?

  27. Does your host allow .htaccess? Is mod_rewrite enabled?

  28. nerdtech
    Member
    Posted 9 years ago #

    Turns out that my acct was not enabled for AllowOverride - once our lead admin on the server fixed that for me, its now working.

    Thanks, all!

  29. iasthai
    Member
    Posted 9 years ago #

    I was having the same problem using Apache 2 on my home machine as a test server. I could modify the .htaccess file and httpd.conf but when I clicked the post links I got 404. After a lot of hair pulling and calling for the damnation of all technology, I found the culprit. At the beginning of the httpd.conf file, there is a list of LoadModule commands. The particular command to load the rewrite module was commented out with a # sign. I simply removed the #, saved, restarted apache, and it works fine. This is the code:

    LoadModule rewrite_module modules/mod_rewrite.so

    I have no idea if it looks the same in all httpd.conf files. And, if your site is being hosted by an isp, I suspect you won't have access to this file, either because they protect it or they've buried it in a directory tree so complex it would rival the world's toughest mazes. But regardless, if the isp is worth its silicon they'll be willing to change it for you. I hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.