Hello,
I have a VPS host here and for this example my domain is www.test.com
What I’m trying to do is create a dynamic sub domain so whatever I type before it, passes through a htaccess file and will let me handle it however I want. So, if someone typed sdhsfoisd.test.com it would say ok, let’s take you to the main website directory, oh look there’s a htaccess file what should we do now, the htaccess would redirect that url to any place I want it to go.
I tried creating a DNS A record pointing to my IP (*.test.com xxx.xxx.x.xxx) but we have over 50 sites on the same IP so it just kept redirecting to http://xxx.xxx.x.xxx which didn’t have a site there.
I also tried adding the following to the httpd.include file in the vhosts' conf directory but it didn’t help either.
The whole goal for this is to make a subdomain that accepts anything you type. It sends it to the root directory of the site where the htaccess will then handle the request.Code:<VirtualHost *:80> ServerName *.test.com:80 ServerAlias www.test.com UseCanonicalName Off SuexecUserGroup carl psacln </VirtualHost>
Any ideas on how to do this?


LinkBack URL
About LinkBacks



Reply With Quote
.
Bookmarks