WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Very Odd Problem with Pretty Links and 404 errors (15 posts)

  1. listerdl
    Member
    Posted 2 years ago #

    OK this is very odd. I set pretty links in my WP like this /%postname%/

    Sometimes when I visit the published page an error 404 page not found message is given. Then 5 minutes later it magically appears again.....

    What can I problem check?

    Could it be a server issue in that they have enabled mod_security and are not allowing this page to be published (at certain times)

    I am completely confused since it seems to have a mind of its own.

    Thanks

  2. esmi
    Forum Moderator
    Posted 2 years ago #

  3. listerdl
    Member
    Posted 2 years ago #

    Thanks - I did review that and I think that everything is ok.

    What gets me though is that I get an error 404 every now and again on that page - it almost feels like there is a cycle going on somewhere turning something on and off....

    Have you heard of this before?

    Thanks

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

  5. listerdl
    Member
    Posted 2 years ago #

    thanks those are very good tips.

    Why would the page sometimes throw a 404 error though? I guess it must be one of the above issues....

  6. listerdl
    Member
    Posted 2 years ago #

    I didnt explain the above correctly, what I meant was that sometimes the page just doesn't load and it gives a 404 - so there must be a cycle that for some reasons blocks the loading of the page....

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    Have you tried any of the above suggestions?

  8. listerdl
    Member
    Posted 2 years ago #

    Yes I only have one plugin which is the back-up WP plugin which I disabled.

    I am trying the Twenty Eleven theme and will post the result.

    Thanks for your help

  9. listerdl
    Member
    Posted 2 years ago #

    OK seems to work fine using the Twenty Eleven theme but now something even weirder has happened.

    I changed the permalinks to be the MONTH AND NAME SETTING:

    http://www.my-site.com/5/2011/10/sample-post/

    Saved settings but WP still insists on reverting back to the old /%postname%/

    Am I missing something here....?

  10. esmi
    Forum Moderator
    Posted 2 years ago #

    Site url?

  11. listerdl
    Member
    Posted 2 years ago #

    thanks for your help.

    I changed the permalinks to "month and name": http://www.my-site.com/5/2011/10/sample-post/ but WP still publishes under the old /%postname%/ settings.....(I saved the settings page...)

    This is the page in question: http://www.concise-courses.com/5/testing-new-site/ which seems to work ok

    The blog is located concise-courses.com/5 - i.e. in /5/

    This is my .htaccess:

    # WP Admin Block
    <Files wp-login.php>
    order deny,allow
    deny from all
    allow from 123.123.123.123 (I changed this now for this post)
    </Files>

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

    ErrorDocument 404 http://www.concise-courses.com/404.html

    # Prevent malicious modification of the GlOBALS and $_REQUEST variables
    # Many attacks will attempt to inject malicious scripts into your database. Prevent this by adding the following code to your .htaccess file:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
    RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
    RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
    RewriteRule ^(.*)$ index.php [F,L]

    # Protect wp-config.php
    <Files wp-config.php>
    order allow,deny
    deny from all
    </Files>

    # Protect .htaccess file:
    <Files .htaccess>
    order deny,allow
    deny from all
    </Files>

    # Protect Public Browsing:
    Options All -Indexes

  12. esmi
    Forum Moderator
    Posted 2 years ago #

    http://www.concise-courses.com/5/2011/09/hello-world/ is working fine for me - both the single post page and the link to it on your front page. Remember to press CTRL and F5 simultaneously when viewing an updated page/site. Or try emptying your browser cache. This should ensure that your web browser fetches a fresh copy of the page rather than serving up an out-dated copy from your own cache.

  13. listerdl
    Member
    Posted 2 years ago #

    thanks - def an excellent tip about CTRL + F5

    Only thing is though, having delete the cache and cookies etc - in WP the actual Permalink URL above the copy in the edit page - still lists the URL as the old version not the updated "month and name" which is was updated to.

    Also if I view this URL it still publishes without any problems: http://www.concise-courses.com/5/testing-new-site/ When I guess it should NOT display b/c the Permalinks has been chaged (and saved)

    I just want to make sure that it is all set correctly!

    Thanks again

  14. esmi
    Forum Moderator
    Posted 2 years ago #

    No - the url you mentioned above is a static Page. Only Posts are affected by a changed custom permalink structure.

  15. listerdl
    Member
    Posted 2 years ago #

    Ah, thanks

    Esmi you've been very kind thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.