Ссылка со слешем в конце и без — разные страницы (БИТРИКС)

Если вы хотите что бы по ссылке со слешом или без открывалась одна и та же страница, то добавьте правило добавлять слеш ссылка в htaccess:

  RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_URI} ^(.*/[^/\.]+)$
   RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]

Поместить в .htaccess

Ссылка со слешем в конце и без — разные страницы (БИТРИКС)

6 мыслей о “Ссылка со слешем в конце и без — разные страницы (БИТРИКС)

  • 12.03.2024 в 17:37
    Permalink

    Wow, superb blog structure! How lengthy have you ever been running a blog for?
    you made blogging glance easy. The total look of your web site is
    wonderful, as smartly as the content material!
    You can see similar here najlepszy sklep

  • 14.03.2024 в 14:14
    Permalink

    Genuinely when someone doesn’t know then its up to other visitors that they will help, so here it
    happens. I saw similar here: Ecommerce

  • 22.03.2024 в 07:42
    Permalink

    When I initially commented I seem to have clicked
    the -Notify me when new comments are added- checkbox and from now on each time a comment is
    added I get four emails with the same comment. Perhaps there is an easy method you can remove
    me from that service? Thanks a lot! I saw similar here:
    Dobry sklep

  • 28.03.2024 в 16:52
    Permalink

    Hey! Do you know if they make any plugins to assist with
    SEO? I’m trying to get my blog to rank for some targeted keywords but I’m not
    seeing very good success. If you know of any please
    share. Thank you! You can read similar blog here: Najlepszy sklep

  • 03.04.2024 в 11:37
    Permalink

    Hi! Do you know if they make any plugins to assist with SEO?

    I’m trying to get my website to rank for some targeted keywords but I’m not seeing very good
    success. If you know of any please share.
    Kudos! I saw similar text here: Backlink Portfolio

  • 28.06.2024 в 13:48
    Permalink

    Great read! The clarity and depth of your explanation are commendable. For further reading, here’s a useful resource: EXPLORE FURTHER. Let’s discuss!

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *