any.domain.co.uk を php スクリプトに移動し、html 内の URL の「anything」を使用して、たとえばさまざまなヘッダーを作成します。これは、このための私の.phpファイルのスクリプトです
<?php echo array_shift(explode(".",$_SERVER['HTTP_HOST']));?>
I have used the script below but it creates a loop obviously. How do I get anything.domain.co.uk to pick up the php script, still have anything.domain.co.uk in the url and also have www.domain.co.uk go to 'normal' index page
Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !www.domain.co.uk$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain.co.uk [NC]
RewriteRule (.*) http://%2.domain.co.uk/$1 [R=301,L]