Wondering if anyone can help me with Mod_Rewrite?
I have a domain called Whois setup to point at my main domain, and have this in my .htaccess file:
code:
RewriteCond %{HTTP_HOST} ^(www\.)?whois.mydomain.com
RewriteRule ^$ /whois.php?d=$1 [L]
Now I'm trying to make it so whatever is apended after the domain gets passed as a variable to the script, eg
whois.mydomain.com/google.com would call whois.php?d=google.com
I got a regex to match a domain (/([a-z0-9.-]+\.[a-z]{2,4})/i) but can't get it to work, and am a bit stuck now so wondered if anyone can help.
Any help will be greatly appreciated