<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум АлаичЪ'а о SEO - Не работает ошибка 404, если не правильно набрано название категории]]></title>
	<link rel="self" href="https://talk.alaev.info/feed/atom/topic/1443/" />
	<updated>2017-12-14T09:05:15Z</updated>
	<generator>PunBB</generator>
	<id>https://talk.alaev.info/topic/1443/</id>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/10330/#p10330" />
			<content type="html"><![CDATA[<p>Приветствую Всех!</p><p>Как сделать, чтобы категория, в которой нет новостей не отдавала код 404? Т.е. попадала в индекс?</p>]]></content>
			<author>
				<name><![CDATA[samstudent]]></name>
				<uri>https://talk.alaev.info/user/1220/</uri>
			</author>
			<updated>2017-12-14T09:05:15Z</updated>
			<id>https://talk.alaev.info/post/10330/#p10330</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/10164/#p10164" />
			<content type="html"><![CDATA[<p>Приветствую. </p><p>У меня такая проблема в конце адреса site.ru/%20) такие символы.</p><p>Яндекс проиндексировал страницу и добавил в поиск.</p><p>Помогите пожалуйста избавится от такого.</p>]]></content>
			<author>
				<name><![CDATA[samstudent]]></name>
				<uri>https://talk.alaev.info/user/1220/</uri>
			</author>
			<updated>2016-06-25T09:56:12Z</updated>
			<id>https://talk.alaev.info/post/10164/#p10164</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9614/#p9614" />
			<content type="html"><![CDATA[<p><strong>svetlana</strong> спасибо, действительно в корне сайта создал страницу 404 и все заработало</p>]]></content>
			<author>
				<name><![CDATA[vla90535564]]></name>
				<uri>https://talk.alaev.info/user/1103/</uri>
			</author>
			<updated>2015-06-04T12:28:15Z</updated>
			<id>https://talk.alaev.info/post/9614/#p9614</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9613/#p9613" />
			<content type="html"><![CDATA[<p>да вариантов то много придумать можно, знать бы еще что вы там вообще делаете и где <img src="https://talk.alaev.info/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Такой проблемы изначально в движке нет, даже в старых версиях, скорее всего косяк в каких-то правках, которые вносили вы.<br />Я бы для начала проверила бы в чем вообще проблема, чтобы не возиться, достаточно сделать резервное копирование файлов движка и заменить как минимум \engine\modules, engine.php, init.php, index.php, и .htaccess в корне на оригинальные из движка, просто методом исключения найдите в каком месте проблема и тогда уже смотреть будем <img src="https://talk.alaev.info/img/smilies/smile.png" width="15" height="15" alt="smile" />.<br /></p><p class="lastedit merged"><em>Добавлено: 03.06.2015 22:39</em></p><p>@require_once($_SERVER[&#039;DOCUMENT_ROOT&#039;].&#039;/404.html&#039;);<br />загружает 404.html в корне сайта, не статическую а именно лежащий на сервере файл.<br /></p>]]></content>
			<author>
				<name><![CDATA[svetlana]]></name>
				<uri>https://talk.alaev.info/user/783/</uri>
			</author>
			<updated>2015-06-03T19:39:19Z</updated>
			<id>https://talk.alaev.info/post/9613/#p9613</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9611/#p9611" />
			<content type="html"><![CDATA[<p><strong>svetlana,</strong> в .htaccess прописано ErrorDocument 404 /404.html<br />и код <br />if (!$category_id AND $view_template != &quot;rss&quot;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;HTTP/1.x 404 Not Found&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Status: 404 Not Found&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@require_once($_SERVER[&#039;DOCUMENT_ROOT&#039;].&#039;/404.html&#039;);<br />die();&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />прописал, но получается тоже самое, то есть пустая страница...</p><p>Я так понял вот этот код @require_once($_SERVER[&#039;DOCUMENT_ROOT&#039;].&#039;/404.html&#039;); должен был загрузить страницу 404.html ??? Подскажите может есть еще варианты решения проблемы??</p>]]></content>
			<author>
				<name><![CDATA[vla90535564]]></name>
				<uri>https://talk.alaev.info/user/1103/</uri>
			</author>
			<updated>2015-06-02T13:01:44Z</updated>
			<id>https://talk.alaev.info/post/9611/#p9611</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9610/#p9610" />
			<content type="html"><![CDATA[<p>в .htaccess <br /></p><div class="codebox"><pre><code>ErrorDocument 404 /404.html</code></pre></div><p>Можно еще вариант попробовать</p><div class="codebox"><pre><code>if (!$category_id AND $view_template != &quot;rss&quot;) {
                    header(&quot;HTTP/1.x 404 Not Found&quot;);
                    header(&quot;Status: 404 Not Found&quot;);
                   @require_once($_SERVER[&#039;DOCUMENT_ROOT&#039;].&#039;/404.html&#039;);
die();      
            }</code></pre></div><p class="lastedit merged"><em>Добавлено: 02.06.2015 14:02</em></p><p>404.html замените на свой<br /></p>]]></content>
			<author>
				<name><![CDATA[svetlana]]></name>
				<uri>https://talk.alaev.info/user/783/</uri>
			</author>
			<updated>2015-06-02T11:02:45Z</updated>
			<id>https://talk.alaev.info/post/9610/#p9610</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9609/#p9609" />
			<content type="html"><![CDATA[<p><strong>vla90535564</strong>, Я не в курсе этого вопроса.</p>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://talk.alaev.info/user/2/</uri>
			</author>
			<updated>2015-06-01T21:10:18Z</updated>
			<id>https://talk.alaev.info/post/9609/#p9609</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9608/#p9608" />
			<content type="html"><![CDATA[<p><strong>АлаичЪ</strong>, Теперь почти все верно:&nbsp; остается не правильно набранный адрес в строке браузера, выдает 404 ошибку, но открывается белая страница.</p><p>Прописал следующее: </p><p>if (!$category_id AND $view_template != &quot;rss&quot;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;HTTP/1.0 404 Not found&quot;);<br />die();&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>Не подскажите как подключить сюда загрузку нужного мне шаблона??? чтобы не белая страница загружалась, а шаблон который я выберу.</p>]]></content>
			<author>
				<name><![CDATA[vla90535564]]></name>
				<uri>https://talk.alaev.info/user/1103/</uri>
			</author>
			<updated>2015-06-01T17:51:00Z</updated>
			<id>https://talk.alaev.info/post/9608/#p9608</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9602/#p9602" />
			<content type="html"><![CDATA[<p><strong>vla90535564</strong>, Все нормально работает.<br />Если надо заменить 301 на 404 ошибку, то вот код:<br /></p><div class="codebox"><pre><code>if (!$category_id AND $view_template != &quot;rss&quot;) {
                    header(&quot;HTTP/1.0 404 Not found&quot;);
            }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://talk.alaev.info/user/2/</uri>
			</author>
			<updated>2015-06-01T06:28:15Z</updated>
			<id>https://talk.alaev.info/post/9602/#p9602</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9600/#p9600" />
			<content type="html"><![CDATA[<p>АлаичЪ подскажи пожалуйста!!!!</p>]]></content>
			<author>
				<name><![CDATA[vla90535564]]></name>
				<uri>https://talk.alaev.info/user/1103/</uri>
			</author>
			<updated>2015-05-31T07:31:50Z</updated>
			<id>https://talk.alaev.info/post/9600/#p9600</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9592/#p9592" />
			<content type="html"><![CDATA[<p>Подскажите друзья, как правильно редактировать код под мой нужды?????</p>]]></content>
			<author>
				<name><![CDATA[vla90535564]]></name>
				<uri>https://talk.alaev.info/user/1103/</uri>
			</author>
			<updated>2015-05-27T07:55:19Z</updated>
			<id>https://talk.alaev.info/post/9592/#p9592</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9589/#p9589" />
			<content type="html"><![CDATA[<p>Теперь при неправильно набранном адресе категории, (например /igвыаыri/ вместо /igri/ ) перенаправляет на стандартную страницу ошибки 404.html, вроде почти как и должно быть на мой взгляд, но сервер отдает не ошибку 404 на страницу&nbsp; &nbsp;мой_сайт.ру/igвыаыri/&nbsp; &nbsp;, а 301 редирект. А что если изменить немного код, подскажите как это будет правильнее сделать, вместо: </p><p> if (!$category_id AND $view_template != &quot;rss&quot;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;HTTP/1.0 301 Moved Permanently&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Location: {$config[&#039;http_home_url&#039;]}&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;Redirect&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>что-то вроде:</p><p> if (!$category_id AND $view_template != &quot;rss&quot;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;HTTP/1.0 404 Not found&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Location: {$config[&#039;http_home_url&#039;]}&quot;);&nbsp; &nbsp; &lt;------- а здесь должен оставаться неправильно написанный адрес категории<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;Redirect&quot;);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;-------- что здесь должно быть прописано???<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p>]]></content>
			<author>
				<name><![CDATA[vla90535564]]></name>
				<uri>https://talk.alaev.info/user/1103/</uri>
			</author>
			<updated>2015-05-25T11:57:33Z</updated>
			<id>https://talk.alaev.info/post/9589/#p9589</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9588/#p9588" />
			<content type="html"><![CDATA[<p><strong>vla90535564</strong>, Тогда заменить<br /></p><div class="codebox"><pre><code>{$config[&#039;http_home_url&#039;]}</code></pre></div><p> на<br /></p><div class="codebox"><pre><code>{$config[&#039;http_home_url&#039;]}/404.php</code></pre></div>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://talk.alaev.info/user/2/</uri>
			</author>
			<updated>2015-05-25T11:25:14Z</updated>
			<id>https://talk.alaev.info/post/9588/#p9588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9587/#p9587" />
			<content type="html"><![CDATA[<p>Вы вероятно вот этот код имели ввиду:</p><p>//решение проблемы с категориями, которых не существует<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!$category_id AND $view_template != &quot;rss&quot;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;HTTP/1.0 301 Moved Permanently&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Location: {$config[&#039;http_home_url&#039;]}&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die(&quot;Redirect&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />//решение проблемы с категориями, которых не существует</p><p>То есть будет перекидывать на главную, а желательно на /404.php...<br />можно ли вместо главной прописать /404.php?</p>]]></content>
			<author>
				<name><![CDATA[vla90535564]]></name>
				<uri>https://talk.alaev.info/user/1103/</uri>
			</author>
			<updated>2015-05-25T11:13:40Z</updated>
			<id>https://talk.alaev.info/post/9587/#p9587</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не работает ошибка 404, если не правильно набрано название категории]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/9586/#p9586" />
			<content type="html"><![CDATA[<p>Ответ тут https://alaev.info/blog/post/3294</p>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://talk.alaev.info/user/2/</uri>
			</author>
			<updated>2015-05-24T20:40:08Z</updated>
			<id>https://talk.alaev.info/post/9586/#p9586</id>
		</entry>
</feed>
