Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 4th, 2012  |  syntax: None  |  size: 0.42 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Redirecting dynamic subdomain with directroy structure to a single file
  2. RewriteCond %{HTTP_HOST} !^www.domain.com
  3. RewriteCond %{HTTP_HOST} ([^.]+).domain.com
  4. RewriteCond %{REQUEST_URI} ^news/news-details.php$
  5. #RewriteCond %{QUERY_STRING} !^id=.
  6. RewriteRule (.*) /news.php?div=%1 [L]
  7.        
  8. RewriteCond %{HTTP_HOST} ^(.+).domain.com [NC]
  9. RewriteCond %{HTTP_HOST) !^www.
  10. RewriteRule ^news/news-details.php$ /news.php?div=%1 [NC,QSA,L]