<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2595892</guid>
        <pubDate>Sun, 16 May 2010 18:55:01 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2595892</link>
        <description><![CDATA[osa: некрасиво заниматься некрофильством<br>
<br>
<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=265203&view=findpost&p=2595414'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>shu &#064; <time class="tag-quote__quoted-time" datetime="2010-05-16T01:45:54+04:00">15.05.10, 21:45</time></span><div class='quote '>также слышал что ниже приведенные страницы воспринимаются поисковиками как отдельные. </div></div><br>
нет не правда]]></description>
        <author>osa</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2595414</guid>
        <pubDate>Sat, 15 May 2010 21:45:54 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2595414</link>
        <description><![CDATA[shu: Добрый день&#33;<br><br>есть задача по mod_rewrite<br><br>Есть сайт. Страницы на котором примерного вида:<br>http://site.ru/page1.html<br>http://site.ru/page2.html<br>http://site.ru/page3.html<br><br>необходимо сделать чтобы выглядело так:<br>http://page1.site.ru/<br>http://page2.site.ru/<br>http://page3.site.ru/<br><br><br>также слышал что ниже приведенные страницы воспринимаются поисковиками как отдельные. Правда ли это и как сделать редирект на одну (к примеру http://www.site.ru/)<br><br>http://site.ru/<br>http://www.site.ru/<br>http://site.ru/index.html<br>http://www.site.ru/index.html<br><br>Заранее благодарен за ответ&#33;]]></description>
        <author>shu</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2203614</guid>
        <pubDate>Tue, 24 Feb 2009 15:59:05 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2203614</link>
        <description><![CDATA[dark_barker: блин ну выше ведь похожие примеры :unsure:]]></description>
        <author>dark_barker</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2203276</guid>
        <pubDate>Tue, 24 Feb 2009 11:44:37 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2203276</link>
        <description><![CDATA[Thompson: А вот такой вопросик.<br>Есть домен forum.site.ru, я его привязал к папке /subdomains/forum.site.ru/<br>Всё работает, но иногда, появляются ссылки вида:<br>http://forum.site.ru/subdomains/forum.site.ru/<br>Которые тоже работают.<br>А как сделать так чтоб mod_rewrite, когда к нему обращаешся по такой ссылки, &quot;убирал&quot; часть &quot;subdomains/forum.site.ru/&quot; и переадресовывал (уже простым редиректом) на нормальную?]]></description>
        <author>Thompson</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2202929</guid>
        <pubDate>Tue, 24 Feb 2009 06:01:46 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2202929</link>
        <description><![CDATA[negram: ну там ещё упоминание про virtual host  :rolleyes: <br>а так -- да :)]]></description>
        <author>negram</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2202914</guid>
        <pubDate>Tue, 24 Feb 2009 05:38:02 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2202914</link>
        <description><![CDATA[dark_barker: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=265203&view=findpost&p=2201305'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>negram &#064; <time class="tag-quote__quoted-time" datetime="2009-02-21T10:07:16+00:00">21.02.09, 10:07</time></span><div class='quote '>эм? Обработка обращения к поддомену</div></div>Тоже самое, что мой пост выше :yes:]]></description>
        <author>dark_barker</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2202364</guid>
        <pubDate>Mon, 23 Feb 2009 09:02:43 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2202364</link>
        <description><![CDATA[Thompson: Пасибо, заработало =)]]></description>
        <author>Thompson</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2201305</guid>
        <pubDate>Sat, 21 Feb 2009 10:07:16 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2201305</link>
        <description><![CDATA[negram: эм? <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=142559' target='_blank'>Обработка обращения к поддомену</a>]]></description>
        <author>negram</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200392</guid>
        <pubDate>Thu, 19 Feb 2009 21:16:17 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200392</link>
        <description><![CDATA[dark_barker: А, ну так через DNS уже сделано, тогда да, прошу прощения, не заметил.<br>
<br>
Если в последней строке убрать R=301 никаких 500 не должно быть.<br>
Если надо конкретный субдомен.. то что то типа такого:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">RewriteBase /</div><div class="code_line">RewriteCond %{HTTP_HOST} forum.example.com</div><div class="code_line">RewriteCond %{REQUEST_URI} !forum/</div><div class="code_line">RewriteRule ^(.*)$ forum/ [L]</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>dark_barker</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200364</guid>
        <pubDate>Thu, 19 Feb 2009 20:16:12 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200364</link>
        <description><![CDATA[Крост: как на счёт убрать флаг r=301 из последней строки? тоже 500?]]></description>
        <author>Крост</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200334</guid>
        <pubDate>Thu, 19 Feb 2009 19:30:33 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200334</link>
        <description><![CDATA[Thompson: Ну так и прошу помощи с мод реврайт<br><br>он ж как раз в .htaccess прописывается...]]></description>
        <author>Thompson</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200332</guid>
        <pubDate>Thu, 19 Feb 2009 19:28:39 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200332</link>
        <description><![CDATA[dark_barker: Причём тут .htaccess? Надо DNS настраивать соответствующим образом, чтобы запросы шли куда надо. Либо сделать так, чтобы они шли в корень, а там уже разруливать через мод_реврайт.]]></description>
        <author>dark_barker</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200328</guid>
        <pubDate>Thu, 19 Feb 2009 19:25:18 +0000</pubDate>
        <title>субдомены и mod_rewrite</title>
        <link>https://forum.sources.ru/index.php?showtopic=265203&amp;view=findpost&amp;p=2200328</link>
        <description><![CDATA[Thompson: Всем привет.<br>
Опишу свою проблему:<br>
Есть домен domain.ru и субдомен forum.domain.ru<br>
<br>
Все они привязаны к папке /domain.ru, но я хочу при помощи .htaccess сделать так чтобы все запросы к forum.domain.ru шли на domain.ru/forum/<br>
<br>
Перепробовал много примеров из сети, заработал только вот этот<br>
<br>
RewriteEngine on<br>
RewriteCond %{http_host} .<br>
RewriteCond %{http_host} &#33;^www.example.com [NC]<br>
RewriteCond %{http_host} ^([^.]+)&#092;.example.com [NC]<br>
RewriteRule ^(.*) http://www.example.com/%1/ [R=301,L,QSA]<br>
<br>
Но тут есть одно но - редирект идет внешний (браузер переходит на новую ссылку), а мне надо чтобы этот редирект был на стороне сервера - чтобы пользователь думал, что он фактически работает с субдоменом.<br>
<br>
Как это сделать? Помогите, кто чем может)<br>
<br>
Любое изменение последней строчки чаще всего ведет к ошибке 500 =(]]></description>
        <author>Thompson</author>
        <category>WWW Masters. Прочее</category>
      </item>
	
      </channel>
      </rss>
	