• Resolved kzyz

    (@kzyz)


    It will be redirect loop When set the custom permalink on the front page.

    ’Sample page’ is static page.
    1. Set ’Sample page’ to the front page (Reading Settings).
    2. Set Custom Permalink to the ’Sample page’.
    3. It will be redirection loop When you view ’Sample page’.

    https://ww.wp.xz.cn/plugins/custom-permalinks/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi kzyz,

    If i am getting you correct so, you are trying to say that you have created a sample page and selected that sample page as front page from the settings.

    After making that sample page as front page the page starts redirecting to the front page.

    Let’s say this is your sample page url: http://www.example.com/sample-page

    After making it front page, it starts redirecting to here: http://www.example.com/

    This is what you are saying? Please confirm..

    Thanks,
    Sami

    Thread Starter kzyz

    (@kzyz)

    Hi Sami,

    That’s right.

    example:

    create ‘Sample page’.
    set to custom permalink ‘index.html’.
    select ‘Sample page’ as front page from the settings.
    and select ‘Custom Structure(/%post_id%/)’ from the Permalink Settings.

    (WordPress 4.5.3 + Custom Permalinks 0.7.27) is Redirect Loop.
    http://test.gluum.com/index.html

    (WordPress 3.7.1 + Custom Permalinks 0.7.16) is OK.
    http://test2.gluum.com/index.html

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi kzyz,

    Thanks for your confirmation but this is not the plugin issue. This is WordPress version issue. As far as i know, this issue has arises in WordPress 4.5 and still exist on the current version of WordPress 4.5.3

    You can update the latest version of the plugin on your WordPress 3.7.1 and check the issue. I am sure you will not get any issue there.

    To fix this issue on WordPress 4.5.3, you can put the below mention code in your theme functions.php

    function static_page_redirecting_front_page($redirect_url) {
      if( is_front_page() ) {
        $redirect_url = false;
      }
    
      return $redirect_url;
    }
    
    add_filter( 'redirect_canonical', 'static_page_redirecting_front_page' );

    If you have any question so, let me know 😉
    Thanks,
    Sami

    Thread Starter kzyz

    (@kzyz)

    Hi Sami,

    Thank you so much.

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    kzyz, You welcome 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Front Page Redirect Loop’ is closed to new replies.