• Resolved amish

    (@amish)


    I’m currently running movable type for my blog, but am considering moving to WordPress. I set up a test installation in a subdirectory so I could play around with it and get familiar with it before I go ‘live.’

    For the life of me, I can’t figure out how to get pretty permalinks working (/year/month/day/postname/). I’ve created a blank .htaccess file and put that in my test directory. I’ve checked with my host and made sure that mod_rewrite is enabled. When I change the permalink settings, WordPress seems to accept the changes, and reflects the new links when I view the main page. However, these links don’t actually work. In addition, no changes/additions are shown in the .htaccess file in my temp directory.

    How can I get this working?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Are you on a Windows, or a Unix server?

    Thread Starter amish

    (@amish)

    Linux (Unix?)
    Apache Version 1.3.36

    How about a url to the test WordPress install?

    Some good troubleshooting stuff on the Permalinks codex page.

    mod_rewrite is good, also confirm AllowOverride is on too if you can.

    When you go to Options -> Permalinks, is WP displaying a message at the bottom indicating what you need to manually add to .htaccess? If so, do that! If not, then you should be able to save changes there and see new stuff in your .htaccess file.

    Thread Starter amish

    (@amish)

    I’ve sent in a ticket to verify AllowOverride.

    WP is not displaying any messages indicating what to manually add to .htaccess. The only thing I’m getting is a note at the top saying Permalink structure updated.

    Is there a standard set of lines that should be added? If so, what are they?

    I looked at the Permalinks codex page, but nothing there seems to address/fix the problem.

    If WP isn’t displaying what should be added, then it must be doing to for you. What’s in the .htaccess located at the root of your blog installation (same dir as wp-config.php)?

    Thread Starter amish

    (@amish)

    Its a blank* file that I created (uploaded via ASCII transfer, 666 permissions). It doesn’t get updated when I change permalink options.

    *Not entirely blank. I was getting an ‘fread’ error in the file editor in WP, so I created a 5 character comment to give the file some data.

    Thread Starter amish

    (@amish)

    I’m not too familiar with .htaccess and how it works, but is there any chance that the .htaccess file at the domain root (which is where my current movable type installation publishes to) is part of the problem?

    Thread Starter amish

    (@amish)

    URL for the WP install:

    https://www.amishshah.com/wptest/

    Thread Starter amish

    (@amish)

    Some more info….

    I modified the .htaccess file permissions to 644, to remove write access. I was hoping that I might force WP to give me the info to manually input into the file. But even after I did that, I still got the confirmation that the Permalink structure was updated. Nothing else was written on the bottom.

    So confused….would love any more insight.

    Thread Starter amish

    (@amish)

    Problem is fixed now….

    The following piece of information from the Using Permalinks codex helped fix the problem:

    Server Blockage: Your host might have blocked the SERVER_SOFTWARE variable and this will cause WordPress’ .htaccess generation to fail. If you are sure that your server is running Apache, you can force WordPress to believe that your server is running Apache by changing your wp-includes/vars.php file. Follow the steps below to implement these changes.

    1. Open the wp-includes/vars.php file using the built in file editor in your WordPress Admin panel. To navigate to this panel, login to WordPress, click on “Manage”, then on “Files”, scroll to the bottom and type in wp-includes/vars.php into the text box under the “Other Files” title.
    2. Look for $is_apache = strstr($_SERVER[‘SERVER_SOFTWARE’], ‘Apache’) ? 1 : 0;, once you find it replace it with // $is_apache = strstr($_SERVER[‘SERVER_SOFTWARE’], ‘Apache’) ? 1 : 0;
    3. Add a new line under // $is_apache = strstr($_SERVER[‘SERVER_SOFTWARE’], ‘Apache’) ? 1 : 0; and type in $is_apache = 1;

    I modified the vars.php file as described above to force WP to believe that Apache was there. Then I reset my permalink options to the default style and deleted the .htaccess that was there.

    I then went back to Permalink options and created the Pretty Permalink style. WP successfully created the new .htaccess with the proper mod_rewrite rules.

    I had this same problem using vodahost. They told me that I did in fact have mod_rewrite turned on, but I could not get the permalinks to work.

    I found the solution above and used it with one modification.

    when I tried to update the vars.php file using the built in editor, it failed to save, so I had to download the vars file to my computer, update it with the line specified in the post above, and then upload the vars.php file again.

    changed the permalinks back to default

    deleted the .htaccess file

    changed the permalinks back to my custom /%category%/%postname%.html and it created the new .htaccess file with the rewrite code updated.

    nice.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Pretty Permalinks Not Working’ is closed to new replies.