Киби.ru

Живой сайт об актуальных проектах

User Tools

Site Tools


joomla:htaccess1
  • Bookmark "joomla:htaccess1" at LiveJournal
  • Bookmark "joomla:htaccess1" at Facebook
  • Bookmark "joomla:htaccess1" at VKontakte
  • Bookmark "joomla:htaccess1" at Twitter
  • Bookmark "joomla:htaccess1" at Odnoklassniki
  • Bookmark "joomla:htaccess1" at del.icio.us
  • Bookmark "joomla:htaccess1" at Google
  • Bookmark "joomla:htaccess1" at Favorites

Задача

Есть два доменных имени http://sandwich-ppu.ru и http://sendvich-ppu.ru. При обращении к любому из этих имён пользователь должен попадать на http://sendvich-ppu.ru.

Решение

В корне сайта http://sandwich-ppu.ru размещаем .htaccess следующего содержания:

RewriteEngine on
 
RewriteCond %{HTTP_HOST} ^sandwich-ppu.ru$ [OR]
RewriteCond %{HTTP_HOST} ^www.sandwich-ppu.ru$
RewriteRule ^(.*)$ "http\:\/\/www\.sendvich\-ppu\.ru\/$1" [R=301,L]
  • Bookmark "joomla:htaccess1" at LiveJournal
  • Bookmark "joomla:htaccess1" at Facebook
  • Bookmark "joomla:htaccess1" at VKontakte
  • Bookmark "joomla:htaccess1" at Twitter
  • Bookmark "joomla:htaccess1" at Odnoklassniki
  • Bookmark "joomla:htaccess1" at del.icio.us
  • Bookmark "joomla:htaccess1" at Google
  • Bookmark "joomla:htaccess1" at Favorites
You could leave a comment if you were logged in.
joomla/htaccess1.txt · Last modified: 2010/11/14 18:58 by kibi