Forum Moderators: phranque
What code did you test with?
Where was it located? (.htaccess, httpd.conf, other?)
What URL did you request to test this code?
Did you enable mod_rewrite and start the RewriteEngine (Using the "Options" and "RewriteEngine on" directives?)
Does a simple mod_rewrite function such as the following work?
RewriteRule ^/?foo\.html$ http://www.webmasterworld.com/? [R=302,L] Have you declared your subdomains in your DNS settings and server configuration -- either specifically or using a wild-card?
Jim
But how declare my subdomains in DNS settings and in server configuration?
thanks you,
On your server, add mod_rewrite code to check for the "paul" subdomain in the environment variable %{HTTP_HOST} and internally rewrite those requests to your script with "paul" as the user= value in the query string.
This will only work if either:
A) You have a unique IP address for your domain and/or you are on an IP-based shared virtual server.
-or-
B) You have used your control panel to declare "paul" as an "add-on domain" and have pointed that add-on domain to the same filespace as your main domain.
-or-
C) You have have used your control panel to declare "paul" as an "add-on domain" and a copy of the index.php script appears in the filespace assigned by the control panel for that add-on domain.
Jim