Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Member
    Join Date
    Aug 2013
    Posts
    89
    Member #
    37057

    No Error Pages and Control over Error Pages

    Hi, I want to know, when I visit my site, for example; http://www.mysite.com/acme.html and acme.html is not a html file on my server. Why it redirects to my web page, in the example, that would be http://www.mysite.com, instead of a 404 error ?

    I would also like to switch between having cPanel or WordPress take over 404 error pages. At present when a page is not found, WordPress is displaying it's own 404 error page, this relates to the first part as to why no error page occurs ?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Sounds like you have some sort of rule in place to process 404 errors as 301 redirects to the home page. Yahoo carts do this for example.

    This is not the correct behavior, as you've indicated. You'll need to look at your .htaccess file if you have one. Also check your 404 page for any unexpected 301s and remove them. It's hard to say where the error might be though. It could be in a million places.

  4. #3
    Member
    Join Date
    Aug 2013
    Posts
    89
    Member #
    37057
    What should I be searching for in my HTACCESS file ?

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Anything associated with a 301 redirect (usually rules with "301" in them somewhere.)
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Member
    Join Date
    Aug 2013
    Posts
    89
    Member #
    37057
    It probably is not even related, it's the closest thing I could find as a possibility; RewriteRule . http://www.test/test/test.htm [L]

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    That wouldn't do it.

    Can you post the contents of your .htaccess file here?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  8. #7
    Member
    Join Date
    Aug 2013
    Posts
    89
    Member #
    37057
    It's safe to do that Or should I PM you it, then you can reply here.

  9. #8
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    That's why I asked if you could...it isn't necessarily safe, depending on if you have any password-protected directories or things like that. If you just have a bunch of rewrite/redirect rules, then you should be okay.

    You can PM me if you want, but I'm not the most knowledgeable .htaccess guy. There are better people than I am that can handle it.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  10. #9
    Member
    Join Date
    Aug 2013
    Posts
    89
    Member #
    37057
    It is mostly rewrite rules, I hope I'm safe.

    IndexIgnore *
    <IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase </directory>
    RewriteRule <web address> [NC,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . <web address> [L]
    </IfModule>
    #DirectoryIndex <html page> index.php

  11. #10
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Ahhh. Okay. I think I see your problem. Again, I'm not an .htaccess expert, although I can read it.
    Code:
    RewriteCond %{REQUEST_FILENAME} !-f # this means "if the file doesn't exist"
    RewriteCond %{REQUEST_FILENAME} !-d # this means "if the directory doesn't exist"
    RewriteRule . <web address> [L]
    If you comment those two conditions out (or remove them), the redirect behavior should stop. You will, however, need to find a way to deal with dead URLs. How you do that is up to you, although I'd suggest that whatever you do that you return a proper 404 response code for the dead URLs.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:48 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com