Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Dynamic subdomains for profiles

SS ✭✭
edited August 2010 in Vanilla 2.0 - 2.8
Task: Dynamic subdomains for profile pages (or any other similar /xxx/yyy/zzz) =>
Also: Apache, mod_rewrite, configured DNS (any request to * points to the same IP as

1. Cannot think mod_rewrite rule.
2. Canonical URL: <--- incorrect! correct is
Possible <a href="">issue 479 is related to this problem

Question: no question, just wonder to discuss.


  • LincLinc Detroit Admin
    edited August 2010
    <VirtualHost *:80> ServerName DocumentRoot /path/to/docroot ErrorLog /path/to/logs/yoursite RewriteEngine On RewriteCond %{HTTP_HOST} !^yoursite\.com$ [NC] # Has subdomain RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC] # Not www RewriteRule ^(.*)\.yoursite\.com$ /profile/$1 [PT,L] # Silent redirect RewriteCond %{HTTP_HOST} !^yoursite\.com$ [NC] # Has subdomain RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC] # Not www RewriteRule ^(.*)\.yoursite\.com(.*) yoursite\.com/$2 [L] # Redirect if not profile </VirtualHost>
    Untested! Just my Monday-morning conjecture :)
Sign In or Register to comment.