<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : форум на субдомене</title>
		<link>https://www.cotonti.com</link>
		<description>Останні повідомлення в темі</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 11 Apr 2026 17:58:13 -0000</pubDate>

		<item>
			<title>jcrush</title>
			<description><![CDATA[Сделал все по инструкции, ссылки в листе стали в виде чпу, но при клике редирект на обычный вид т.е. вижу <a href="http://сайт/auto" rel="nofollow">http://сайт/auto</a> кликаю идет на <a href="http://сайт/list.php?c=auto" rel="nofollow">http://сайт/list.php?c=auto</a><br />
<br />
это вариант с 2,4 на субдоменах не работает<br />
<br />
я слышал что некоторые хостеры не поддерживают редиректы с субдоменов на основной сайт, как тут используется, как поправить?]]></description>
			<pubDate>Пн, 20 Кві 2009 09:54:53 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11619]]></link>
		</item>
		<item>
			<title>Dayver</title>
			<description><![CDATA[Так в том то и дело из всего что нужно сделать по руководству Ломби для реализовать лишь форумы урезать .htaccess не обязательно(можно полностью взять его вариант), а вот урезать urltrans.dat нужно потому как если возмешь его полную версию то у тебя начнут преобразовыватся и пейджы и листы.<br />
<br />
Правда в его .htaccess последние две строки вызывают подозрение (а когда я ставил себе...правда не в варианте поддоменности.......последню строчку пришлось убрать....ибо сайт уходит в 301 редирект непонятно на что)]]></description>
			<pubDate>Пн, 20 Кві 2009 08:51:29 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11617]]></link>
		</item>
		<item>
			<title>jcrush</title>
			<description><![CDATA[ну я взял полностью вариант ломби, единственное .htaccess твой, его зацикливается и отрубает сайт  не работает, ошибок нет, только урлы такие -s9.html]]></description>
			<pubDate>Пн, 20 Кві 2009 08:39:06 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11614]]></link>
		</item>
		<item>
			<title>Dayver</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=11611#11611">#</a> <strong>jcrush :</strong>
к тому же твой functions.custom.php  выдает ошибку на 13 строчку, взял у Ломби<br />
</blockquote>
Прикольно если учитывать то что я в нем ничего не менял, а тупо скопипастил из его поста(лишь добавивь в начало &lt;php которое он упустил)<br />
<br />
<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=11611#11611">#</a> <strong>jcrush :</strong>
Не получается, выходит так:<br />
<br />
<a href="http://forum.stfw.ru/-s9.html" rel="nofollow">http://forum.stfw.ru/-s9.html</a><br />
</blockquote>
Странно конечно потому как урезал я только лишь содержимое .htaccess, а оно на формирование ссылок не влияет(предназначено для переадресации с виртуальных ссылок на реальные).<br />
<br />
Нужно выяснять что за ошибка в functions.custom.php]]></description>
			<pubDate>Пн, 20 Кві 2009 08:29:45 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11612]]></link>
		</item>
		<item>
			<title>jcrush</title>
			<description><![CDATA[Не получается, выходит так:<br />
<br />
<a href="http://forum.stfw.ru/-s9.html" rel="nofollow">http://forum.stfw.ru/-s9.html</a><br />
<br />
Not Found<br />
The requested URL /-s9.html was not found on this server.<br />
<br />
к тому же твой functions.custom.php  выдает ошибку на 13 строчку, взял у Ломби]]></description>
			<pubDate>Пн, 20 Кві 2009 07:47:15 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11611]]></link>
		</item>
		<item>
			<title>Dayver</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=11589#11589">#</a> <strong>jcrush :</strong>
на хостинге должен быть субдомен или нет?<br />
</blockquote>
Думаю не нужен.....хотя поэксперемнтируйте будет ли работать сходу или нет<br />
<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=11589#11589">#</a> <strong>jcrush :</strong>
так же будут ли старые урлы работать?<br />
</blockquote>
уверен что будут работать]]></description>
			<pubDate>Нд, 19 Кві 2009 20:15:09 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11592]]></link>
		</item>
		<item>
			<title>jcrush</title>
			<description><![CDATA[на хостинге должен быть субдомен или нет?<br />
<br />
так же будут ли старые урлы работать?]]></description>
			<pubDate>Нд, 19 Кві 2009 19:41:20 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11589]]></link>
		</item>
		<item>
			<title>Dayver</title>
			<description><![CDATA[ну я не проверял как оно работает на субдомене но если нужно реализовать только для форума то тут вроде ничего сложного нету все делаем как Ломби написал(но чуток урезав):<br />
<br />
<strong>config.php</strong><br />
<pre class="code">$cfg&#091;'urls_pattern'&#093; = '3'; //1=old, 2=cat/page.html, 3=subdomains, 4=cat/page/</pre>
Видимо получим формат ссылок forum.site.com/topic-t1.html<br />
<br />
в <strong>system/functions.php</strong> после строки<br />
<pre class="code">define('SED_GROUP_TOPADMINS', 5);</pre>
вставляем строчку<br />
<pre class="code">include($cfg&#091;'system_dir'&#093;.'/functions.custom.php');</pre>
<br />
создаем файл <strong>functions.custom.php</strong> с содержимым:<br />
<div style="margin:4px 0px 4px 0px"><input type="button" value="functions.custom.php" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != '') { this.parentNode.getElementsByTagName('div')[0].style.display = ''; } else { this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; }" /><div style="display:none" class="spoiler"><pre class="code">&lt;php
if (!defined('SED_CODE')) { die('Wrong URL.'); }
 
function makesafe($text)
{
    //$text = preg_replace(&quot;#&amp;\#(&#091;0-9&#093;*);#ie&quot;,&quot;_&quot;,$text);
    $text = html_entity_decode($text);
    $text = str_replace(&quot; / &quot;,&quot;_&quot;,$text);
    $text = str_replace(&quot;'&quot;,&quot;&quot;,$text);
    $text = str_replace(&quot;\&quot;&quot;,&quot;&quot;,$text);
    $text = str_replace(&quot;/&quot;,&quot;_&quot;,$text);
    $text = str_replace(&quot;'&quot;,&quot;_&quot;,$text);
    $text = str_replace(&quot; - &quot;,&quot;_&quot;,$text);
    $text = str_replace(&quot;-&quot;,&quot;_&quot;,$text);
    $text = str_replace(&quot; &quot;,&quot;_&quot;,$text);
    $text = str_replace( &quot;ä&quot;, &quot;ae&quot;, $text);
    $text = str_replace( &quot;ö&quot;, &quot;oe&quot;, $text);
    $text = str_replace( &quot;ü&quot;, &quot;ue&quot;, $text);
    $text = str_replace( &quot;Ä&quot;, &quot;Ae&quot;, $text);
    $text = str_replace( &quot;Ö&quot;, &quot;Oe&quot;, $text);
    $text = str_replace( &quot;Ü&quot;, &quot;Ue&quot;, $text);
    $text = str_replace( &quot;ß&quot;, &quot;ss&quot;, $text);
    $text = str_replace( &quot;&amp;&quot;, &quot;and&quot;, $text);
    $text = str_replace( &quot;%&quot;, &quot;Percent&quot;, $text);
    $text = str_replace( &quot;ó&quot;, &quot;o&quot;, $text);
    $text = ereg_replace(&quot;&#091;^A-Za-z0-9_-&#093;&quot;, &quot;&quot;, $text);
    $text = str_replace(&quot;____&quot;,&quot;_&quot;,$text);
    $text = str_replace(&quot;___&quot;,&quot;_&quot;,$text);
    $text = str_replace(&quot;__&quot;,&quot;_&quot;,$text);
    $text = strtolower($text);
    return $text;
}
 
function cot_category_url(&amp;$args)
{
    global $cfg;
    $url = parse_url($cfg&#091;'mainurl'&#093;);
    $www = strstr($url&#091;'host'&#093;, 'www.') ? 'www' : '';
    $domain = str_replace('www.', '', $url&#091;'host'&#093;);
    $path = $url&#091;'path'&#093;;
 
    $patterns = array(
    'list.php?c={$c}',
    '/{$c}/',
    'http://{$c}.{$domain}/',
    '/{$c}/'
    );
    $url = str_replace(array('{$c}', '{$domain}'), array($args&#091;'c'&#093;, $domain), $patterns&#091;$cfg&#091;'urls_pattern'&#093; - 1&#093;);
    unset($args&#091;'c'&#093;);
    return $url;
}
 
function cot_page_url(&amp;$args)
{
    global $cfg, $pag, $row, $rpagecat;
    $url = parse_url($cfg&#091;'mainurl'&#093;);
    $www = strstr($url&#091;'host'&#093;, 'www.') ? 'www' : '';
    $domain = str_replace('www.', '', $url&#091;'host'&#093;);
    $path = $url&#091;'path'&#093;;
 
    $patterns = array(
    '/page.php?al={$alias}',
    '/{$c}/{$alias}.html',
    'http://{$c}.{$domain}/{$alias}.html',
    '/{$c}/{$alias}/'
    );
    $page_cat = (!empty($rpagecat) &amp;&amp; empty($page_cat)) ? $rpagecat : $page_cat;
    $page_cat = (!empty($pag&#091;'page_cat'&#093;) &amp;&amp; empty($page_cat)) ? $pag&#091;'page_cat'&#093; : $page_cat;
    $page_cat = (!empty($row&#091;'page_cat'&#093;) &amp;&amp; empty($page_cat)) ? $row&#091;'page_cat'&#093; : $page_cat;
    $url = str_replace(array('{$c}', '{$alias}', '{$domain}'), array($page_cat, $args&#091;'al'&#093;, $domain), $patterns&#091;$cfg&#091;'urls_pattern'&#093; - 1&#093;);
    unset($args&#091;'al'&#093;);
    return $url;
}
 
function cot_forum_section_url(&amp;$args)
{
    global $cfg, $fsn, $row, $row1, $master, $title;
    $stitle = $title;
    $url = parse_url($cfg&#091;'mainurl'&#093;);
    $www = strstr($url&#091;'host'&#093;, 'www.') ? 'www' : '';
    $domain = str_replace('www.', '', $url&#091;'host'&#093;);
    $path = $url&#091;'path'&#093;;
 
    $title = (!empty($fsn&#091;'fs_title'&#093;)) ? $fsn&#091;'fs_title'&#093; : $row&#091;'fs_title'&#093;;
    $title = (empty($title)) ? $stitle : $title;
    $title = (empty($title)) ? $master&#091;1&#093; : $title;
    $title = (empty($title)) ? $row1&#091;'fs_title'&#093;  : $title;
 
    $patterns = array(
    '/forums.php?m=topics&amp;q={$id}',
    '/forum/{$title}-s{$id}.html',
    'http://forum.{$domain}/{$title}-s{$id}.html',
    '/forum/{$title}-s{$id}.html'
    );
    $url = str_replace(array('{$id}', '{$title}', '{$domain}'), array($args&#091;'s'&#093;, makesafe($title), $domain), $patterns&#091;$cfg&#091;'urls_pattern'&#093; - 1&#093;);
    unset($args&#091;'s'&#093;, $master);
    return $url;
}
 
function cot_forum_topic_url(&amp;$args)
{
    global $cfg, $fsnn, $fsn, $row, $ft_title;
    $url = parse_url($cfg&#091;'mainurl'&#093;);
    $www = strstr($url&#091;'host'&#093;, 'www.') ? 'www' : '';
    $domain = str_replace('www.', '', $url&#091;'host'&#093;);
    $path = $url&#091;'path'&#093;;
    
    
    $title = (!empty($fsnn&#091;'fs_lt_id'&#093;)) ? $fsnn&#091;'fs_lt_id'&#093; : $fsn&#091;'fs_lt_id'&#093;;
    $title = (empty($title)) ? $row&#091;'ft_title'&#093; : $title;
    $title = (empty($title)) ? $ft_title : $title;
    
    $patterns = array(
    '/forums.php?m=posts&amp;q={$id}',
    '/forum/{$title}-t{$id}.html',
    'http://forum.{$domain}/{$title}-t{$id}.html',
    '/forum/{$title}-t{$id}.html'
    );
    $url = str_replace(array('{$id}', '{$title}', '{$domain}'), array($args&#091;'q'&#093;, makesafe($title), $domain), $patterns&#091;$cfg&#091;'urls_pattern'&#093; - 1&#093;);
    unset($args&#091;'q'&#093;);
    return $url;
}
 
function cot_main_urls(&amp;$args, &amp;$spec)
{
    global $cfg;
    $url = parse_url($cfg&#091;'mainurl'&#093;);
    $www = strstr($url&#091;'host'&#093;, 'www.') ? 'www' : '';
    $domain = str_replace('www.', '', $url&#091;'host'&#093;);
    $path = $url&#091;'path'&#093;;
    $patterns = array(
    '/forums.php',
    '/forum/',
    'http://forum.{$domain}/',
    '/forum/'
    );
    if(empty($args) &amp;&amp; $spec&#091;'_area'&#093; == 'forums')
    {
        $url = str_replace(array('{$domain}'), array($domain), $patterns&#091;$cfg&#091;'urls_pattern'&#093; - 1&#093;);
    }
    else
    {
        $url = $spec&#091;'_area'&#093;.'.php';
    }
    return $url;
}
 
?&gt;</pre></div></div>
и кладем его в папку <strong>system</strong><br />
<br />
в файл <strong>urltrans.dat</strong> из папочки <strong>datas</strong> вставляем:<br />
<pre class="code">forums	m=posts&amp;q=*	{cot_forum_topic_url()}
forums	m=topics&amp;s=*	{cot_forum_section_url()}</pre>
(это так же можно сделать не вручную а через админку)<br />
<br />
ну и напоследок в файле <strong>.htaccess</strong> вставляем строки <br />
<div style="margin:4px 0px 4px 0px"><input type="button" value=".htaccess" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != '') { this.parentNode.getElementsByTagName('div')[0].style.display = ''; } else { this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; }" /><div style="display:none" class="spoiler"><pre class="code">Options +FollowSymlinks
RewriteEngine On

# **** NEW FORUMS ****
RewriteCond %{HTTP_HOST} !^(www\.)?(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteCond %{HTTP_HOST} ^forum\.(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteRule ^$ forums.php &#091;L&#093;

RewriteCond %{HTTP_HOST} !^(www\.)?(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteCond %{HTTP_HOST} ^forum\.(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteRule ^(.*)-t(&#091;0-9&#093;*)\.html(.*)$ forums.php?m=posts&amp;q=$2$3 &#091;L&#093;

RewriteCond %{HTTP_HOST} !^(www\.)?(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteCond %{HTTP_HOST} ^forum\.(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteRule ^(.*)-f(&#091;0-9&#093;*)\.html(.*)$ forums.php?m=topics&amp;s=$2$3 &#091;L&#093;

RewriteCond %{HTTP_HOST} !^(www\.)?(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteCond %{HTTP_HOST} ^forum\.(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteRule ^(.*)-s(&#091;0-9&#093;*)\.html$ forums.php?m=topics&amp;s=$2$3 &#091;L&#093;

RewriteCond %{HTTP_HOST} ^main\.(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
RewriteRule ^$ <a href="http://www.%1.%2/" rel="nofollow">http://www.%1.%2/</a> &#091;R=301,L&#093;

RewriteCond %{HTTP_HOST} ^main\.(&#091;^.&#093;+)\.(com|org|si|net|ru)/?$
RewriteRule ^(.+)$ <a href="http://www.%1.%2/$1" rel="nofollow">http://www.%1.%2/$1</a> &#091;R=301,L&#093;

RewriteRule ^forum/$ forums.php &#091;L&#093;
RewriteRule ^forum/(.*)-t(&#091;0-9&#093;*)\.html(.*)$ forums.php?m=posts&amp;q=$2$3 &#091;L&#093;
RewriteRule ^forum/(.*)-f(&#091;0-9&#093;*)\.html(.*)$ forums.php?m=topics&amp;s=$2$3 &#091;L&#093;
RewriteRule ^forum/(.*)-s(&#091;0-9&#093;*)\.html$ forums.php?m=topics&amp;s=$2$3 &#091;L&#093;

## *** Catch all for any /*/ ****
#RewriteCond %{HTTP_HOST} ^(www\.)?(&#091;^.&#093;+)\.(com|org|si|net)?$
#RewriteCond %{REQUEST_URI} !^/(users|forum|forums|reviews|main|tags)/(.*)\.html$
#RewriteRule ^(.*)/(.*)\.html(.*)$ <a href="http://$1.%2.%3/$2.html$3" rel="nofollow">http://$1.%2.%3/$2.html$3</a> &#091;R=301,L&#093;

#RewriteCond %{HTTP_HOST} ^(www\.)?(&#091;^.&#093;+)\.(com|org|si|net|ru)?$
#RewriteCond %{REQUEST_URI} !^/(users|forum|forums|reviews|main|tags)/$
#RewriteRule ^(.*)/$ <a href="http://$1.%2.%3/" rel="nofollow">http://$1.%2.%3/</a> &#091;R=301,L&#093;

RewriteCond %{HTTP_HOST} ^(&#091;^.&#093;+)\.(com|org|si|net|ru) &#091;NC&#093; 
RewriteRule ^(.*)$ <a href="http://www.%1.%2/$1" rel="nofollow">http://www.%1.%2/$1</a> &#091;R=301,L&#093;</pre></div></div>
Тут может я не все строки выкосил(постарался оставить только те которые отвечают за форум) но даже если и так то это ничего страшного на функционирование других частей сайта не должно повлиять]]></description>
			<pubDate>Нд, 19 Кві 2009 19:20:54 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11588]]></link>
		</item>
		<item>
			<title>jcrush</title>
			<description><![CDATA[Привет всем, в соседней ветке про мод рерайт, видел что реализован сабж, как можно сделать это только для форума? без ЧПУ для всего сайта.]]></description>
			<pubDate>Сб, 18 Кві 2009 09:32:27 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2624&d=0#post11562]]></link>
		</item>
	</channel>
</rss>