Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

redirect

Why does WordPress automatically redirect URLs with the parameter “name=” to a different page?

In WordPress, name is a reserved term (emphasis mine): There is a complete set of reserved keywords, or terms, in WordPress that should not be used in certain circumstances as they may conflict with core functionality. You should avoid using any of these terms when: Passing a term through a $_GET or $_POST array Registering … Read more

Categories redirect Tags parameter, redirect, urls

Redirect to custom url when registration fails?

You could add an htaccess redirect or try out the theme my login plugin: http://wordpress.org/extend/plugins/theme-my-login/. It has options for custom redirection.

Categories redirect Tags redirect, user-registration

Redirect blog page to latest post?

You can use the get_posts() function: <?php /* Template Name: Redirect */ $args = array( ‘posts_per_page’ => ‘1’, ‘post_type’ => ‘post’ ); $post = get_posts($args); if($post){ $url = get_permalink($post[0]->ID); wp_redirect( $url, 301 ); exit; }

Categories redirect Tags post-meta, redirect

Correct way to hide pseudo pages from being shown?

Well those are two different things: A redirect means they are not accessible any more at all. noindex just means that search engines ignore it while it is still accessible if you access the URL. So I’d recommend option 1. This is a simple way of doing this that you can improve an. (E.g. this … Read more

Categories redirect Tags google, redirect, robots.txt

Implementing global redirection (automatic redirect for all pages who had their slug changed)

Say you have 20 or even 50 pages that needs permalink changes. How can you guarantee an automatic redirect formation for all of them afterwards? The part of a post URL that can be edited in WordPress is called the “slug”. For a URL like http://example.com/blog/abc-xyz, then the “abc-xyz” part would be the slug. The … Read more

Categories redirect Tags redirect

How to redirect all requests to wp-login.php?

To restrict direct access only for ‘wp-login.php’, without POST or GET request (useful for custom ajax login forms), I use the advanced function: function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { if ( isset( $_POST[‘wp-submit’] ) || // in case of LOGIN ( isset($_GET[‘action’]) && $_GET[‘action’]==’logout’) || // in case of LOGOUT ( … Read more

Categories redirect Tags redirect, wp-login-form

Site redirects to wrong url when saving settings

From looking at your .htaccess, it looks like your has too many rules overlapping each other. Do the following instead: Keep a backup of your current .htaccess if you need to go back to it Delete your .htaccess form the server, WordPress should automatically create a fresh one for you Open your new .htaccess file … Read more

Categories redirect Tags .htaccess, directory, redirect, site-url, subdomains

Clarification on auth_redirect()

The answer requires a little bit of WP forensics because this function has been in WordPress since 1.5 but has undergone some changes along the way. One thing that has not changed however is the description “Checks if a user is logged in, if not it redirects them to the login page.” I think that … Read more

Categories redirect Tags redirect, wp-login-form

handling login/logout redirects

This really does belong in a plugin, but you can just as easily drop it in your theme’s functions.php function default_login_redirect( $redirect, $request_redirect ) { if ( $request_redirect === ” ) $redirect = home_url(); return $redirect; } add_filter( ‘login_redirect’, ‘default_login_redirect’, 10, 2 );

Categories redirect Tags login, logout, redirect

301 redirect not working through .htaccess

Replace Redirect 301 / http://newsite.com/ by RewriteRule ^(.*)$ http://newsite.com/ [L,R=301]

Categories redirect Tags .htaccess, redirect
Older posts
Newer posts
← Previous Page1 … Page94 Page95 Page96 … Page100 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress