Jump to content
View in the app

A better way to browse. Learn more.

Дизайн и модификация Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Как изменить canonical тег главной страницы?

Установлен IP.Board 3.2.2

Адрес форума имеет вид: domen.ru

Но тег canonical имеет вид: <link id="ipsCanonical" rel="canonical" href="http://domen.ru/index.php?act=idx" />

 

Подскажите пжл, как изменить и где изменить этот тег? Уже все шаблоны пересмотрел не могу найти :(

 

А то "морда" не индексируется из-за этого тега :(

 

Нужно чтобы было именно так: <link id="ipsCanonical" rel="canonical" href="http://domen.ru" />

Featured Replies

  • Author

Никто помочь не может? (((

тег формируется здесь

/admin/sources/classes/output/formats/coreOutput.php

  • Author

тег формируется здесь

/admin/sources/classes/output/formats/coreOutput.php

 

Большое спасибо! Пойду ковырять файл :)

У меня на 3.2.3 тег правильный на главной странице...

  • Author

Нашел упоминание об "?act=idx" только в этом файле: /admin/sources/classes/output/publicOutput.php

 

И там вот такие вот строчки кода есть:

/* SEO Tweak - if default app is forums then don't bother with act=idx nonsense */
		if ( IPS_DEFAULT_APP == 'forums' )
		{
			if ( stristr( $url, 'act=idx' ) )
			{
				$url = str_ireplace( array( IPS_PUBLIC_SCRIPT . '?act=idx', '?act=idx', 'act=idx' ), '', $url );
			}
		}

 

Кто-то может подсказать?

Этот код как раз и убирает данный суффикс для главной страницы. А почему он не работает в Вашем случае - сказать затрудняюсь.

Оказывается есть такое на отключенным чпу.

 

Ниже:

		if ( substr( $url, -6 ) == '/index' )
		{
			$url = substr_replace( $url, '', -5 );
		}

 

Добавить

		if( strpos( $url, 'act=idx' ) )
		{
			$url = $this->settings['board_url'] . '/';
		}

  • Author

Оказывается есть такое на отключенным чпу.

 

Спасибо большое :) Все настроил и всё работает как надо!

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.