Make WordPress Core

Opened 14 years ago

Last modified 12 months ago

#23060 reopened enhancement

Throw 404 if URL Rewriting is Used With Default Permalinks

Reported by: onetarek Owned by:
Priority: normal Milestone: Awaiting Review
Component: Permalinks Version: 3.5
Severity: normal Keywords: dev-feedback
Cc: Focuses:

Description

Suddenly I discovered that my blog is not returning error 404 page. My blog permalink is set as default style http://test.onetarek.com/?p=123
Now I am trying to create 404 error by using this url http://test.onetarek.com/adsfjkasjdd , it showing home page. Then I tested http://test.onetarek.com/?p=123654 now it shows 404 page.
Then I tried to load a not existing image http://test.onetarek.com/wp-content/themes/twentyeleven/images/headers/not-image.jpg it shows my home page instead of 404 page.
I changed my permalink settings to "Day and name" then it show 404 page.

I tested this problem in my another blog, this blog is return 404 page but that is not generated by wordpress. Wordpress 404 theme page is not being loaded. A blank page is being loaded with a message by Apache Server "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request...."

So what is the problem with permalink settings and 404 page.

Change History (6)

#1 @miqrogroove
14 years ago

  • Resolutioninvalid
  • Status newclosed

Your server is mis-configured. WordPress is not supposed to load at all in this situation.

The only way I can reproduce this behavior is by changing the permalink setting to default and then manually inserting the mod_rewrite directives back into .htaccess forcing WordPress to load for path /adsfjkasjdd (which it should not do).

#2 @nacin
14 years ago

  • Resolution invalid
  • Status closedreopened
  • Type defect (bug)enhancement

If your .htaccess file isn't writable, you may insert the rules on your own, then fail to update your .htaccess file when set to the default permalinks. You also may not be using .htaccess, or even Apache. I think WordPress should attempt to work in this situation.

#3 @miqrogroove
14 years ago

  • Summary WordPress Does Not Return Error 404 When Permalink Structure is Set to Default ?p=123Throw 404 if URL Rewriting is Used With Default Permalinks

Summary for enhancement request then...

#6 @SirLouen
12 months ago

  • Keywords needs-testing removed
Note: See TracTickets for help on using tickets.