Sedang Disiapkan

219643 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 can't get the code to work. 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.

Kemahiran: Semua Boleh, Java, Javascript, MySQL, Perl, PHP

Lihat lebih lanjut: need programmer codes html, subdomain, catch can, redirect code, redirect found, subdomain php code, php rewriteengine, htaccess rewriteengine, php htaccess rewriteengine, rewriteengine, php htaccess help, server redirect, html redirect, rewriterule htaccess, redirect website, htaccess redirect expert, code subdomain, subdomain website, perl html expert, path success, expert htaccess, redirect work php, php subdomain, html redirect site, htaccess subdomain

Tentang Majikan:
( 1 ulasan )

ID Projek: #1965876

Dianugerahkan kepada:

zahmaci

as i explained in PMB.. Scriptlance escrow req..

$30 USD dalam 0 hari
(285 Ulasan)
6.8