[wp-trac] [WordPress Trac] #50490: WordPress URL guessing cannot be stopped
WordPress Trac
noreply at wordpress.org
Sat Jun 27 17:03:02 UTC 2020
#50490: WordPress URL guessing cannot be stopped
--------------------------+-----------------------------
Reporter: devrekli | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Permalinks | Version: 5.4.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Hello. https://wordpress.org/support/topic/how-can-i-remove-redirect/
example:
https://www.ozgurbilgi.net/etiketler/aysegul-tecimer (There is no such
link in the site.)
to https://www.ozgurbilgi.net/aysegul-tecimer-ustsuz-danscilar
**
I tried this**
{{{
function remove_redirect_guess_404_permalink( $redirect_url ) {
if ( is_404() && !isset($_GET['p']) )
return false;
return $redirect_url;
}
add_filter( 'redirect_canonical', 'remove_redirect_guess_404_permalink' );
}}}
**I tried this**
{{{
DELETE FROM <code>wp_postmeta</code> WHERE <code>meta_key</code> =
'_wp_old_slug'
}}}
**my htaccess**
{{{
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
}}}
**I tried this**
{{{
remove_action('template_redirect', 'wp_old_slug_redirect');
remove_filter('template_redirect', 'redirect_canonical');
remove_action( 'post_updated', 'wp_check_for_changed_slugs',
}}}
I searched for it in the database but I couldn’t find it. I do not
understand how it redirect.. I tried all this but these did not solve the
problem. How can I stop this redirect? thanks
others examples
https://www.ozgurbilgi.net/etiketler/aysun-kayaci to ------>
https://www.ozgurbilgi.net/aysun-kayaci-fatih-optu
https://www.ozgurbilgi.net/etiketler/seo to ----->
https://www.ozgurbilgi.net/icerik-pazarlamasinda-basarisiz-olmanizin-
onemli-nedenleri
**I can stop guessing for the normal link but if it gets the prefix
(etiketler like this) , the guessing cannot be stopped.**
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50490>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list