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.
Options

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)
http://vanillaforums.org/profile/mark =>
http://mark.vanillaforums.org/
Also: Apache, mod_rewrite, configured DNS (any request to *.site.com points to the same IP as site.com).

Problems:
1. Cannot think mod_rewrite rule.
2. Canonical URL: mark.vanillaforums.org/profile/mark <--- incorrect! correct is vanillaforums.org/profile/mark
Possible <a href="http://github.com/vanillaforums/Garden/issues/479">issue 479 is related to this problem

Question: no question, just wonder to discuss.






Comments

  • Options
    LincLinc Detroit Admin
    edited August 2010
    <VirtualHost *:80> ServerName yoursite.com 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.