Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RewriteEngine On # Turn on the rewriting engine
- RewriteCond %{http_host} ^www.example.info [nc] #if url starts with www.example.info
- RewriteRule ^(.*)$ http://example.info/$1 [r,nc] #rewrite without the www
- RewriteCond %{http_host} ^www.(.*).example.info [nc] #if url starts with www.(aff).example.info
- RewriteRule ^(.*)$ http://%1.example.info/$1 [r,nc] #rewrite without the www
- RewriteCond %{HTTP_HOST} !^www\. [NC]
- RewriteCond %{http_host} ^(.*)\.example.info [nc] #if subdomain is aff
- RewriteRule ^(.*)$ - [co=aff:%1:example.info:7200:/] #drop/update cookie with aff
- RewriteCond %{HTTP_HOST} !^www\. [NC]
- RewriteCond %{http_host} ^(.*)\.example.info [nc] #if subdomain is aff
- RewriteRule ^(.*)$ http://example.info/$1 [nc,R,L] #rewrite without subdomain
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement