Sedang Disiapkan

220083 Catch all redirect - subdomain

I bought a existing website. Transfered it to a new host. But this website had probably thousands of subdomains previously set up on the old host.

So right now if anyone types in a subdomain they get a "server not found error". So what I'm trying to do is set up a catch-all redirect for the subdomain.

ie: if someone searches for: [url removed, login to view] it will redirect to: [url removed, login to view]

So again anything typed into the subdomain area would redirect them to the main site: [url removed, login to view] (just for example)

I'm getting closer, but so far, I've been told there is several ways to do this. Most recently I've been told it has something to do with DNS wildcards. And that your hosting provider must allow dns wildcards in order for this to work.

We tried a lot of things to get this to work on my existing host, 1and1, but I was told by a programmer that I'd need to find a host that allows DNS Wildcards and that's running cPanel. Both of which appear not to be supported by 1and1 I'm not sure if this is the problem, but it could be the hosting provider I'm using.

Alternatively I was also told that you must add some code to the .htaccess file. The .htaccess codes to do this I found is as follows:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\..+\..*$ [NC]

RewriteCond /full/path/to/homedirectory/htdocs/%1 !-d

RewriteCond /full/path/to/homedirectory/htdocs/%1 !-l

RewriteRule ^(.*)$ [url removed, login to view] [L,NS]

This whole subdomain catch all is explained at: [url removed, login to view]

But I'm not a programmer and just don't quite understand it. I've tried it over and over again but no success. I need an expert who can get this code, or some code like this to work.


1) A programmer to evaluate this situation and figure out if I need a new hosting provider to make this work, or if we can somehow make it work on my existing host.

2) If it's determined that it won't work on my existing host I need a programmer who would be able to find an inexpensive shared hosting provider that has the right elements, dns wildcards, cPanel, etc to get this to work on.

3) Then I'd switch the domain to the new host and we'd work on getting this project completed on the new host if necessary.

Kemahiran: .NET, Semua Boleh, Javascript, MySQL, Perl, Sistem Admin

Lihat lagi: i need a programmer codes for html, get help by an expert, find a server programmer, find a javascript programmer, anyone need a programmer, subdomain, ns-2, ns#, need an inexpensive programmer, dns redirect, htaccess problem, switch order, dns javascript, javascript dns, http redirect, catch can, redirect code, shared hosting cpanel, redirect found, htaccess rewriteengine, redirect htaccess problem, rewriteengine, http redirect code, server redirect, catch dns

Tentang Majikan:
( 1 ulasan )

ID Projek: #1966316