Advertisement
Niko454

Untitled

May 5th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. RewriteEngine On # Turn on the rewriting engine
  2. RewriteCond %{http_host} ^www.example.info [nc] #if url starts with www.example.info
  3. RewriteRule ^(.*)$ http://example.info/$1 [r,nc] #rewrite without the www
  4.  
  5. RewriteCond %{http_host} ^www.(.*).example.info [nc] #if url starts with www.(aff).example.info
  6. RewriteRule ^(.*)$ http://%1.example.info/$1 [r,nc] #rewrite without the www
  7.  
  8. RewriteCond %{HTTP_HOST} !^www\. [NC]
  9. RewriteCond %{http_host} ^(.*)\.example.info [nc] #if subdomain is aff
  10. RewriteRule ^(.*)$ - [co=aff:%1:example.info:7200:/] #drop/update cookie with aff
  11.  
  12. RewriteCond %{HTTP_HOST} !^www\. [NC]
  13. RewriteCond %{http_host} ^(.*)\.example.info [nc] #if subdomain is aff
  14. RewriteRule ^(.*)$ http://example.info/$1 [nc,R,L] #rewrite without subdomain
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement