BALIKADAM
05-02-2012, 18:54
Bunu araştırdım şöyle bir cevap gördüm. A record da oluşturdum ama Drupal kısmında ne yapmak gerektiğini anlayamadım. Blogspottaki gibi üyelere altalanadı nasıl verebiliriz?
- Add A Record for *.yourdomain.com pointing to your Web - Host (No need, if you use your web-host's nameservers)
- Enable Wildcard Subdomain Alias for your domain in your web-hosting account (You may require assistance from your web-host)
Configure Apache Wildcard support
Assuming your Apache config uses vHosts, your new configuration would look like this:
<virtualhost>
ServerName domain.com:80
ServerAlias *.domain.com
...
..
</virtualhost>
The ServerAlias statement enables Wildcard support for your domain. From now on, your Apache vHost will react on non-existent subdomains.
- Add the following lines to your .htaccess
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} !^(www\.)?yourdomain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/blogs/%2/$1 [R=301,L]
- You have to use pathauto to make http://www.yourdomain.com/blogs/username point to your users' blog.
Hope, this will help you. Post your comments.
- Add A Record for *.yourdomain.com pointing to your Web - Host (No need, if you use your web-host's nameservers)
- Enable Wildcard Subdomain Alias for your domain in your web-hosting account (You may require assistance from your web-host)
Configure Apache Wildcard support
Assuming your Apache config uses vHosts, your new configuration would look like this:
<virtualhost>
ServerName domain.com:80
ServerAlias *.domain.com
...
..
</virtualhost>
The ServerAlias statement enables Wildcard support for your domain. From now on, your Apache vHost will react on non-existent subdomains.
- Add the following lines to your .htaccess
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} !^(www\.)?yourdomain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/blogs/%2/$1 [R=301,L]
- You have to use pathauto to make http://www.yourdomain.com/blogs/username point to your users' blog.
Hope, this will help you. Post your comments.