Forum Moderators: phranque
something like this : free.blobal.com
sdsd.blobal.com
kewwefrw.blobal.com
whatever is type in for the subdomain it will always redirect to just blobal.com
is there a way to set it?
Im using Cpanel. Thanks :)
The best way of doing this is to use something called mod-rewrite in apache. Not sure how your hosting is set up, but you need to have access to a file called .htaccess
In there, something similar to this might work:
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]
(Taken from this thread [webmasterworld.com])
You might also want to read this excellent introduction to mod-rewrite [webmasterworld.com]
# -FrontPage-IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.blabla.com
AuthUserFile /home/vom/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/vom/public_html/_vti_pvt/service.grp
Hi! My .htaccess is look like something like this, so do i have to copy paste this code
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]
to my .httacess?
Thanks :)