• Hello,
    I have been trying to change my permalinks into something nicer for SEO purposes. The only one I can use is default, otherwise I get a error 404 in my portfolio. The custom permalink I want is /%category%/%postname%/ . I have looked online, and added:

    # BEGIN WordPress

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

    # END WordPress
    to my .htaccess file. It did not allow me to use my custom permalink.

    My site is nikkicatart.com

    Thanks.

Viewing 15 replies - 1 through 15 (of 24 total)
  • You can try making your .htaccess black and chmod it to 777 then adjust your permalinks. By default wordpress will just write the required .htaccess codes for that specific permalink settings.

    Just give it a try. πŸ™‚

    Cheers,

    Unwired

    making your .htaccess black

    What does that mean?

    When you use “pretty permalinks” WordPress should write the .htaccess file for you, provided that your file/folder permissions are set correctly on the server. BTW 777 is NOT the correct setting.

    Thread Starter NikkiCat

    (@nikkicat)

    I was wondering what making your .htaccess black meant as well. So I should not chmod to 777?

    sorry guys, its a typo “blank”…

    Temporarily chmod to 777 so that it would be rewritable then after that return it to 644…

    You don’t need to CHMOD it to 777 at all. It is supposed to be 644. The 6 means that the user can read and write the file.

    Thread Starter NikkiCat

    (@nikkicat)

    :/ I don’t know who to listen to….
    I am using hostgator if that makes a difference.

    644 isn’t writeable. 777 is.

    Thread Starter NikkiCat

    (@nikkicat)

    Oh also I forgot to mention, the custom permalinks affect my portfolio only…seems to be the page numbers. I will leave it like this for a bit so people can see.
    It is on /%postname%-%post_id%/
    Does that mean it is a theme issue?

    With 644, the owner, in this case, NikkiCat, can read and write.

    Your htaccess looks fine. If wp says it cannot write to the file, it gives you what it wants to write. Sometimes it is exactly what it all ready says. You can open the file with ftp or by signing into your hosted account. Change the name of the file from .htaccess to htaccess.txt so you can edit it. Save it and change the name back.

    If all that is working try
    – deactivating all plugins (yes, all) to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s). If you can’t get into your admin dashboard, try resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems. Also remember to deactivate any plugins in the mu-plugins folder if you have one. The easiest way is to rename that folder to mu-plugins-old

    – switching to the Twenty Eleven theme to rule out any theme-specific problems. If you can’t log in to change themes, you can remove the theme folders via FTP so the only one is twentyeleven. That will force your site to use it.

    @james Edmonston That’s not true at all.

    Using the numbering scheme, the chmod command has three number places, for example 744, representing the three user types. The first number on the left side is for “user”, the middle one is for “group” and the right hand one for “other.” Now, here’s what each number does:

    0 = — = no access
    1 = –x = execute
    2 = -w- = write
    3 = -wx = write and execute
    4 = r– = read
    5 = r-x = read and execute
    6 = rw- = read and write
    7 = rwx = read write execute (full access)

    So, if you set a file to:

    chmod 750
    ^^^
    ||`– 0 = others have no access
    |`– 5 = group has read and execute access
    `– 7 = user has full access

    Hence 644 means that the user can read AND write, everyone else can only read the file. There is no need for any of your WordPress files or folders to be 777 and in fact it’s a security risk.

    For directories:

    read = list files in the directory
    write = add new files to the directory
    execute = access files in the directory

    @nikkicat /%postname%-%post_id%/ is wrong BTW.

    If you want that structure, try /%postname%/%post_id%/

    If you don’t know who or what to believe, always take the advice of a moderator (if possible) or do your own research.

    p.s. All of your WordPress files and folders should be 755 except .htaccess and wp-admin/index.php which should both be 644. If these settings are correct, there is no need to change them.

    Thread Starter NikkiCat

    (@nikkicat)

    All right, thank you, I will give what kmessinger said a try.
    I also changed my structure, thanks Jonas Grumby.
    I’m keeping my settings the same in regards to 644.
    Thank you all, I’ll let you know if anything changes.

    Thread Starter NikkiCat

    (@nikkicat)

    Okay, this sounds really weird, but here it goes.
    I switched to the TwentyEleven Theme. Nothing shows up that uses the custom posts, like the portfolio page. I switch back to my Bizz theme. Everything works perfectly. Look at my permalink page…everything looks good. Look at my website portfolio again…the page numbers give me an error 404. Repeat the first two steps, and it works again.
    So the lesson here I think is…never look at my permalinks page again?? Or if I do I have to repeat the first steps? Odd.

    Is your site live or are you still on MAMP?

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Permalink Issue’ is closed to new replies.