8 replies
  • WEB DESIGN
  • |
I want to change my permalink structure so that the postnames are in the link, not just a number id. I know how to change it within WP, but I do not know how to change the htaccess file to make it work.

Does anyone know if there is a plugin to make this work more easily? I thought by changing that setting before starting the blog it might work, but even then it wanted me to change the htaccess. And I have other sites with lots of pages and posts, so I need something to make this simple for me.

Thanks.
#permalink #structure
  • Profile picture of the author Istvan Horvath
    2 options:
    - make your .htaccess file writable (chmod 666) and WP will take care of it - NOT recommended

    - when WP says you need to update your .htaccess file it also gives you exactly the several lines you need to copy/paste into your htacces file. Edit the file and upload it via FTP to your root directory. Done.
    Signature

    {{ DiscussionBoard.errors[3963227].message }}
  • Profile picture of the author haymanpl
    You don't need to change the htaccess file if you use the proper redirection plugin before you change to the custom permalink structure to /%category%/%postname%/

    or /%postname%/

    WordPress.org codex is not totally reliable and accurate.
    {{ DiscussionBoard.errors[3963804].message }}
  • Profile picture of the author keyconcepts
    Before getting haymanpl's reply, I tried to change the htaccess but could not find one. So I uploaded my own. At that point, the blog would not open at all. So I deleted it, and it came back, but still with the 404 because of the permalink change without the htaccess being updated. Where is the .htaccess file usually located?
    {{ DiscussionBoard.errors[3963865].message }}
  • Profile picture of the author Istvan Horvath
    Set your FTP to show "hidden files" and you will see it if it's there. It should be in the root directory, where all the WP files and directories are.
    However, if you never worked before with the permalinks, maybe you don't have one.

    This is all you need in that file:
    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    Remember, the file doesn't have a "name" just an extension:
    .htaccess
    Signature

    {{ DiscussionBoard.errors[3963932].message }}
  • Profile picture of the author keyconcepts
    Well here is what I did. I put what you have there in a text file and saved it as 1.htaccess.rtf. I then uploaded it into the root and changed the name to .htaccess

    Is that correct?

    When I do that I get an "internal server error" when I try to access the page.

    I really appreciate your help.
    {{ DiscussionBoard.errors[3964012].message }}
  • Profile picture of the author Istvan Horvath
    That sounds right... except I never use any word processor for editing file. Use Notepad or any other plain text editor!

    If it still doesn't work, it's time to ask your host whether they support mode_rewrite or not.
    Signature

    {{ DiscussionBoard.errors[3964105].message }}
  • Profile picture of the author keyconcepts
    Ok. I used TextEdit on my Mac, but for some reason it saved as a rtf. Thanks.
    {{ DiscussionBoard.errors[3964341].message }}
    • Profile picture of the author clau82
      Originally Posted by keyconcepts View Post

      Ok. I used TextEdit on my Mac, but for some reason it saved as a rtf. Thanks.
      It's OK, upload the file and rename it once it's on the server
      {{ DiscussionBoard.errors[3964657].message }}

Trending Topics