Need Help!How to setup the Permalink?

Discussion in 'WordPress' started by jxau00001, Apr 13, 2010.

  1. #1
    I chose the custom structure and then fill it with "/%category%/%postname%" then save it,
    but I found the mistake that post can't be show correctly , instead of "404 - Not Found",what
    do I do? the /%category%/%postname% is copyed from wordpress official site help section,what
    is wrong with it?:confused:
     
    jxau00001, Apr 13, 2010 IP
  2. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Did you update your htaccess after changing the permalink structure?

    If wordpress is able to write to this itself it will update it automatically.

    http://codex.wordpress.org/Changing_File_Permissions

    Otherwise you will need to do it manually. You should have the htaccess code on the same page, right at the bottom.
     
    lukeg32, Apr 13, 2010 IP
  3. Trac3ed

    Trac3ed Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeah your htaccess needs to be updated. If not it wont rewrite the permalinks.
     
    Trac3ed, Apr 13, 2010 IP
  4. pattindahat

    pattindahat Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There is a plugin that does all the htaccess rewriting for you. Gah I can't remember the name, try searching google for it.
     
    pattindahat, Apr 15, 2010 IP
  5. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Wordpress is more than capable of doing it on its own; providing you have the correct file permissions.
     
    lukeg32, Apr 15, 2010 IP
  6. theredsheep

    theredsheep Active Member

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    95
    #6
    Yeah, you don't need a plugin to update the htaccess rules for permalinks. Wordpress does this and does it well. However, a plugin that might help is "redirection" Check it out.

    But like everyone else above said, you need to make sure the htaccess file got updated after you applied your permalink structure, sometimes permissions prevent this from happening and wordpress isn't very good about showing you that it failed at updating the htaccess file, if you're not actively looking for the error.
     
    theredsheep, Apr 15, 2010 IP
  7. catslave

    catslave Active Member

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #7
    that was very helpful
     
    catslave, Apr 16, 2010 IP
  8. googlecrawl

    googlecrawl Banned

    Messages:
    1,739
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    same as me. I have change my permalink and just show 404 not found page. I have opened index.php and click right and put v in all the box write and excute and save it via filezilla but still not work..any idea.
     
    googlecrawl, Apr 16, 2010 IP
  9. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #9
    Its not an index.php problem, if you change the permalink structure, your .htaccess needs to be updated as well.

    If the permissions allow it, wordpress can do this for you. Else, you have to do it manually - you must copy and paste the
    code that is at the bottom of the page where you changed your permalinks.

    http://codex.wordpress.org/Using_Permalinks#Fixing_.htaccess_Generation_Issues
     
    lukeg32, Apr 16, 2010 IP
  10. googlecrawl

    googlecrawl Banned

    Messages:
    1,739
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    so how to update .htaccess I really don't understand. I am new in WP
     
    googlecrawl, Apr 16, 2010 IP
  11. arpitagarwal82

    arpitagarwal82 Notable Member

    Messages:
    2,996
    Likes Received:
    398
    Best Answers:
    0
    Trophy Points:
    280
    #11
    Just create a blank htaccess file in root dir of wordpress install. Then change the permalink structure through wordpress dashboard. It will update the htaccess itself.
    This problem arises when there is no htaccess file present in root dir.
     
    arpitagarwal82, Apr 16, 2010 IP
  12. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #12
    No.

    If it cannot write to .htaccess the problem will arise. The same problem will arise doing as you suggest if wordpress cannot write to the directory too.
     
    lukeg32, Apr 16, 2010 IP
  13. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #13

    Essentially, you need to copy and paste the code from the permalink page (can you see the .htaccess bit at the bottom?) into the .htaccess file in the wordpress root directory......

    When you ftp to the site do you see a .htaccess file? In some FTP software you have to configure it to "show hidden files". If not, create a new file, and just upload it.

    If you do, you will need to edit the file or at the very least give it write (+w) permissions.
     
    lukeg32, Apr 16, 2010 IP
  14. googlecrawl

    googlecrawl Banned

    Messages:
    1,739
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    yeah. After I see in my directory there is no htaccess file..so I must create it but my question is about the code can you post here the code and I can up load it
     
    googlecrawl, Apr 16, 2010 IP
  15. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #15
    Its at the bottom of the permalink page - Settings -> Permalinks

    Just below the save button should be the htaccess code you need.
     
    lukeg32, Apr 16, 2010 IP
  16. googlecrawl

    googlecrawl Banned

    Messages:
    1,739
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    should I give the name of file htaccess.php and where I upload the code in public_html or not
     
    googlecrawl, Apr 16, 2010 IP
  17. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #17
    No - the file should be called .htaccess - it must have a dot at the start and no file extension on it. It should be where your blog is installed too, so public_html sounds like it is the correct place.
     
    lukeg32, Apr 16, 2010 IP
  18. googlecrawl

    googlecrawl Banned

    Messages:
    1,739
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #18
    I have found .htaccess file and this my permalink code:

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

    so where I put the code.
     
    googlecrawl, Apr 16, 2010 IP
  19. Vis

    Vis Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    your .htaccess is fine. You don't need to edit the file for the permalinks...

    Sorry if this looks dumb but check the spelling of the custom structure... test it with only /%postname%/... test with the numeric or date/name based option for permalinks...

    cheers,

    Vis


     
    Vis, Apr 16, 2010 IP
  20. arpitagarwal82

    arpitagarwal82 Notable Member

    Messages:
    2,996
    Likes Received:
    398
    Best Answers:
    0
    Trophy Points:
    280
    #20
    I have alot of experience with wordpress. Technically you are right, but practically I have sen that 99% of time this problem arises due to missing htaccess file. Just create a blank file and then change the permalink structure from wp dashboard. Its fix the issue most of the time.
    Sometimes it happens that after creating a blank file, wp cannot edit the file, change the file permission then, or add the code manually.

    Just try what I have recommended. If problem persist then you can play with code and all. in my opinion, try the simple solution first. :)
     
    arpitagarwal82, Apr 16, 2010 IP