Domain name in URL as variable
问题 My .htaccess file has the following code: RewriteEngine on RewriteRule ^/?(.*)$ index.php?domain=$1 [L] I'm trying to get domain names as variables from URLs like: hxxp://www.example.com/www.domain.name or hxxp://www.example.com/subdomain.domain.name or hxxp://www.example.com/domain.name but with $_GET['domain'] my variable is always 'index.php' and not the domain names. With hxxp://www.example.com/domain/www.domain.name and .htaccess code RewriteEngine on RewriteRule ^domain/?(.*)$ index.php