Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. Каталог site.ru/catalog/index.php -> catalog.site.ru
  2.  
  3. Разделы site.ru/catalog/index.php?&SECTION_CODE=cat1 -> cat1.site.ru
  4.  
  5. Товар site.ru/catalog/index.php?&SECTION_CODE=cat1&ELEMENT_CODE=prod1 -> prod1.cat1.site.ru
  6.  
  7. RewriteEngine On
  8. RewriteCond %{http_host} !^www.site.ru
  9. RewriteCond %{http_host} (www.)?(.*).(.*).site.ru$
  10. RewriteCond %{REQUEST_URI} !^/catalog/
  11. RewriteRule ^(.*)$ /catalog/item.php?ELEMENT_CODE=%2&SECTION_CODE=%3 [QSA,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement