+ Reply to Thread
Results 1 to 4 of 4

Thread: Question about 301 redirects

  1. #1
    Junior Member
    Join Date
    Sep 2020
    Location
    Nizhny Novgorod, Russia
    Posts
    28

    Question about 301 redirects

    Hello.

    Small offer.

    I am testing on a local computer.
    In file: head.tpl

    There is a code:
    Code:
    Only registered members can view the code.
    On page 2 of the listing, we see a link there:

    Code:
    Only registered members can view the code.
    Which leads to the first page.

    However my categories are without "html" at the end. SEO programs show that search engines will find the link and click it. But they will be redirected to the "correct" URL using a 301 redirect.

    Question. Maybe it makes sense if the administrator chooses (without ntml) to give a link here without a redirect?


    The code is actually here: rlCommon.class.php
    PHP Code:
    Only registered members can view the code
    (I think this applies to other cases as well - next / prev)

    301.png

    Search engines are not very fond of useless work.

  2. #2
    Junior Member
    Join Date
    Sep 2020
    Location
    Nizhny Novgorod, Russia
    Posts
    28
    am not good at regular expressions, but maybe this is the correct code:

    PHP Code:
    Only registered members can view the code
    The page: /index2.html
    We get:
    PHP Code:
    Only registered members can view the code
    In this case, the removal (.html) is hard-coded. Perhaps you can somehow tie this with the choice of the administrator, if he chose to remove the html at the end in the admin panel. This is for a one-stop solution. In my case, this is not necessary.

    Such a solution should seem to fit (as a special case)?
    Last edited by Eugeniy; October 16, 2020 at 08:49 AM.

  3. #3
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello,

    Do you mean that the category pages index2, index3, ... etc. should be without .HTML

    if the option "Enable .html at the end of category URLs" is disabled in listing type settings?

  4. #4
    Junior Member
    Join Date
    Sep 2020
    Location
    Nizhny Novgorod, Russia
    Posts
    28
    Quote Originally Posted by Rudi View Post
    Do you mean that the category pages index2, index3, ... etc. should be without .HTML
    No. I'm talking about something else.

    1. Turn off .html in the admin panel
    2. The category page looks fine: site/culture/
    3. Go to the second page and look at the link in the head section that leads to the first page (to the central category page).
    4. It will be with .html

    Code:
    Only registered members can view the code.
    5. Search engines see the link, they click on it. But since the category is without .html, they get a redirect.
    6. There will be as many redirects as there are categories.

    It is enough to change the link to the central page of categories if .html is disabled in the admin panel. This is not critical. Noticed that search engines don't like extra work. Perhaps it will be useful.

+ Reply to Thread