Recent Topics

Using subdomains in blogs

Started by on Apr 27, 2008 – Contents updated: Apr 27, 2008

Apr 27, 2008 01:43    

My b2evolution Version:2.41
Hello. I have a VDS (Virtual Dedicated Server) and I've set up the Wildcard DNS to handle all requests like "subdomain.site.com" and transfer them to "site.com". I've added * IN A site.com. How can I transfer all requests like "someblog.site.com" to "someblog". What should I add to the httpd.conf file? Many thanks in advance for your support.

Apr 27, 2008 03:26

i guess you can deal with it with a simple 301 redirect in .htaccess

Apr 27, 2008 04:53

how can i do it?
sorry my bad English =)

Apr 27, 2008 16:43

i dont want to mislead you, but afaik subdomains are subfolders you have created, so simply create a .txt file enter modifying these

Code

Redirect 301 /mysubdomain1 http://www.mydomain.com
Redirect 301 /mysubdomain2 http://www.mydomain.com

then rename it to .htaccess

or you can use this too:

Code

RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog.mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.blog.mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/blog/1 [R=301,L]


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.