WebFaction
Community site: login faq

I'm seeing some weird behavior in my Wordpress installation:

It's resolving incorrect URLs (looking for similar URLs) and I don't know why. For example, the correct URL is:

http://mydomain.com/apples-and-oranges/

but if I type:

http://mydomain.com/apples-and-ora/

(including the trailing slash) it resolves to the correct URL. And this is actually causing me some problems when the user gets redirected to a similar URL but should not.

Any ideas why? (I have tried removing all the rewrite rules in my .htaccess file, but that didn't fix it.)

asked 30 Jun '14, 16:14

PeterA
10431021
accept rate: 14%


Hello,

I made a clean WordPress install and it looks like this is default behavior. I found a way to disable it here. Simply create a file such as "myplugin.php" in ~/webapps/myapp/wp-content/plugins with that code snippet and a plugin header, then go to the "Plugins" section of /wp-admin and activate it, which will stop the URLs from resolving.

permanent link

answered 30 Jun '14, 19:15

yulian
27214
accept rate: 24%

edited 30 Jun '14, 21:58

Thank you Yulian!

And on that page you found, there is a link to someone who has already created a plugin with this code. You can download it from WordPress.org: https://wordpress.org/plugins/disable-url-autocorrect-guessing/

Also apparently there will be options for this in WordPress 4.0.

(30 Jun '14, 19:24) PeterA

Even better that there's already a plugin :)

If you have any other issues, don't hesitate to let us know.

(30 Jun '14, 19:28) yulian
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×76
×6
×4

question asked: 30 Jun '14, 16:14

question was seen: 4,303 times

last updated: 30 Jun '14, 21:58

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM