WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom permalink 404 Error (21 posts)

  1. yeasin33
    Member
    Posted 3 years ago #

    I use sitename.com/postname
    this is giving me 404 error. In my other sites i always use this but now my new site giving this error. Please help

  2. Adam Losier
    Member
    Posted 3 years ago #

    You probably already done step one but verify that your permalink custom field reads /%postname%/

    My second thought if your using certain hosting providers (I.E. GoDaddy) and this is a new site, or one that has never used the .htaccess before it can take up to 1 hour for the changes to reflect on your site.

    I know that sounds strange but here is the source - http://help.godaddy.com/article/1082?locale=en it states "Changes made to an existing .htaccess file will be seen immediately. When creating new .htaccess files or deleting existing .htaccess files, you might not see changes for up to an hour."

    I've found that issue to sometimes occur but most of the time it doesn't, its quite strange to me but that may be what's happening if you run other sites that work with those settings and this is a new one that doesn't.

  3. yeasin33
    Member
    Posted 3 years ago #

    I cant just believe what i am seeing. Whenever i dont use a permalink base, i am getting the error. whatever the post type is.

    It maybe post, page, tag or category. whatever whatever. but if i use a permalink base. everything is ok. I am using bluehost and their built in simplescripts function to install wordpress. how ridiculous!!! i have a site up for 2 days but the problem is still on. No problem with htaccess i guess. Problem is somewhere else.

  4. Big Bagel
    Member
    Posted 3 years ago #

    Read up on permalink usage here (specifically, the structure tags sections). If you use only /%postname%/ as your custom permalink setting it can cause various issues. One of the problems I've seen in the past is WordPress getting confused and producing random 404's.

  5. yeasin33
    Member
    Posted 3 years ago #

    I have checked that out. Points that hitting my mind.

    1. I was using that permalink for a long time. suddenly what happened.

    2. Pages are also generating 404 error. what can be done in this case. There is no way left to edit page permalink.

    3. I think this is a recent created problem maybe for any update.

    Thanks for your reply. Hope you would help me out

  6. bh_WP_fan
    Member
    Posted 3 years ago #

    What is your site URL?
    What code do you have in your .htaccess?
    What exactly ... very exactly ... do you have your Permalinks set and saved to?

  7. Big Bagel
    Member
    Posted 3 years ago #

    Using only /%postname%/ will only cause problems like this when you have custom post types or a post uses a title similar to a category, page, etc. You can go a long time (indefinitely if you're very careful) before problems start popping up.

    Try switching to one of the non-custom permalink settings. At the very least it'll tell you if that's where the problem lies.

  8. yeasin33
    Member
    Posted 3 years ago #

    My permalink custom structure is ===> /%postname%

    htaccess is default as wordpress installed

    Right now i have re installed wordpress 3.2.1 in one of my old site. and the same thing happened for that site also.
    I must use a base in each and every permalink. This is happening even in a just launched site where post is only Hello world! (wordpress default :p)

    I do never create page. and my post permalink are too bigger than the category names. So there is no chance of collision. But unfortunately that is being obvious.

    Is there any chance in hosting. I am using bluehost shared hosting

  9. yeasin33
    Member
    Posted 3 years ago #

    I do believe, if you guys try this in your own site, same thing would happen in your fate also :(

  10. Adam Losier
    Member
    Posted 3 years ago #

    You stated "I must use a base in each and every permalink." This is a .htaccess file issue with mod_rewrite, most likely caused by your host. Double verify your .htaccess file looks exactly like this.

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

    If it doesn't or is not being generated it may be an issue with your hosts server settings and you can refer to http://codex.wordpress.org/Using_Permalinks#Fixing_.htaccess_Generation_Issues

    You can also try to put a trailing slash onto the end of your permalink so it looks exactly like /%postname%/

    But based upon you saying "I must use a base in each and every permalink." I can almost say for certain its a mod_rewrite issue in your .htaccess file or your host is doing something funny with there Apache settings.

  11. yeasin33
    Member
    Posted 3 years ago #

    Thank you! You are exact to the point.

    My hosting company is constantly changing my htaccess and pulling me down :p
    The htaccess code is be converted to

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    I have just installed 3.1 in another site. which is working fine with permalink /%postname
    Address http://en.intellispell.com/

    Main Site is still facing the problem.

    To show you the error i am keeping the permalink

  12. Big Bagel
    Member
    Posted 3 years ago #

    That rule (RewriteRule ^index\.php$ - [L]) was added to the default WordPress .htaccess rules sometime around version 3.0. Your rules look fine.

  13. yeasin33
    Member
    Posted 3 years ago #

    I must say problem is in wordpress 3.2.1

    Site installed and problem with

    v3.2.1

    http://intellispell.com/

    Working fine With

    v3.1.2

    http://en.intellispell.com/

  14. Adam Losier
    Member
    Posted 3 years ago #

    Hmm that is very strange that 3.2.1 doesn't work while 3.1.2 does, its possible there was a bug that they fixed with permalink's that solved your issue.

    P.S. Big Bagel is correct about that extra line in the .htaccess that was my bad above.

  15. yeasin33
    Member
    Posted 2 years ago #

    At Last I found it out. This Simple mistake had taken away my sleep as well as many hours of my life.

    The problem was, i registered two widgets but didn't use them in the theme. This function was responsible for everything.

    Thanks allah, i found it out. Thank you guys for being so supportive

  16. yeasin33
    Member
    Posted 2 years ago #

    Actually not.

    Whatever the trick is, that is working for few minutes only.

    Someone please please please help me out

    Nothing is linking without permalink base.

    HEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLPPPPPPPPPPPPPPPPPPPPPPPPPPP

  17. gulflee
    Member
    Posted 2 years ago #

    same prob as well

  18. Big Bagel
    Member
    Posted 2 years ago #

    Did you ever try switching to a non-custom permalink structure? If you switch to any of the permalink settings other than "custom structure" and your problems go away, then it's an issue with the custom structure you're using.

  19. gulflee
    Member
    Posted 2 years ago #

    thank you bagel, i solve it by restoring the old wp core and update it manually, it works again, thankyou

  20. chrissy.nesbitt
    Member
    Posted 2 years ago #

    Big Bagel! I have the same problem, and switching to a non-custom permalink structure DID fix it.

    So now that I know it's an issue with the custom structure I'm using, can I fix that?? Surely I can't be doomed to the default settings?

    What I'm using is just a plain old wordpress-suggested structure, the radio button they label as "month and name". Everything was working fine before I migrated my site from a subfolder to the root folder.

    Now the only thing not working is my custom post type. Everything else -- the single posts, the taxonomy pages -- works fine.

  21. chrissy.nesbitt
    Member
    Posted 2 years ago #

    GOT IT. Thanks to AldebaranJill:

    Just had identical issue and here's the fix:
    http://aldebaranwebdesign.com/blog/if-upgrading-to-wordpress-3-1-results-in-404-pages-not-found/

    Had to do with disabling all plugins and regenerating .htaccess file and making sure all plugins were reenabled one at a time and deleted which one broke it. But needed new .htaccess file - so there were two issues - so just because you create new .htaccess file, be sure to make sure all of your plugins are not causing secondary issue.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags